add botset IntSetting for RSS interval

This commit is contained in:
jesopo 2019-07-04 11:15:01 +01:00
parent 7257deac5d
commit 130b5d1927

View file

@ -14,10 +14,13 @@ def _format_entry(feed_title, entry):
return "%s: %s%s%s" % (feed_title, title, author, link)
@utils.export("botset", utils.IntSetting("rss-interval",
"Interval (in seconds) between RSS polls", example="120"))
class Module(ModuleManager.BaseModule):
_name = "RSS"
def on_load(self):
self.timers.add("rss", RSS_INTERVAL)
self.timers.add("rss", self.bot.get_setting("rss-interval",
RSS_INTERVAL))
@utils.hook("timer.rss")
def timer(self, event):