Change modules/in.py to use bot.get_server
This commit is contained in:
parent
a15a2e3444
commit
8b03ecef21
1 changed files with 5 additions and 6 deletions
|
@ -31,9 +31,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
@utils.hook("timer.in")
|
@utils.hook("timer.in")
|
||||||
def timer_due(self, event):
|
def timer_due(self, event):
|
||||||
for server in self.bot.servers.values():
|
server = self.bot.get_server(event["server_id"])
|
||||||
if event["server_id"] == server.id:
|
if server:
|
||||||
server.send_message(event["target"],
|
server.send_message(event["target"],
|
||||||
"%s, this is your reminder: %s" % (
|
"%s, this is your reminder: %s" % (
|
||||||
event["nickname"], event["message"]))
|
event["nickname"], event["message"]))
|
||||||
break
|
|
||||||
|
|
Loading…
Reference in a new issue