Change modules/in.py to use bot.get_server

This commit is contained in:
jesopo 2018-10-12 14:04:14 +01:00
parent a15a2e3444
commit 8b03ecef21

View file

@ -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