add botset IntSetting for RSS interval
This commit is contained in:
parent
7257deac5d
commit
130b5d1927
1 changed files with 4 additions and 1 deletions
|
@ -14,10 +14,13 @@ def _format_entry(feed_title, entry):
|
||||||
|
|
||||||
return "%s: %s%s%s" % (feed_title, title, author, link)
|
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):
|
class Module(ModuleManager.BaseModule):
|
||||||
_name = "RSS"
|
_name = "RSS"
|
||||||
def on_load(self):
|
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")
|
@utils.hook("timer.rss")
|
||||||
def timer(self, event):
|
def timer(self, event):
|
||||||
|
|
Loading…
Reference in a new issue