From 8b03ecef211d77ed83bb7141ca57ba9f08b4340e Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 12 Oct 2018 14:04:14 +0100 Subject: [PATCH] Change modules/in.py to use bot.get_server --- modules/in.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/in.py b/modules/in.py index 3a5ec19a..b490beba 100644 --- a/modules/in.py +++ b/modules/in.py @@ -31,9 +31,8 @@ class Module(ModuleManager.BaseModule): @utils.hook("timer.in") def timer_due(self, event): - for server in self.bot.servers.values(): - if event["server_id"] == server.id: - server.send_message(event["target"], - "%s, this is your reminder: %s" % ( - event["nickname"], event["message"])) - break + server = self.bot.get_server(event["server_id"]) + if server: + server.send_message(event["target"], + "%s, this is your reminder: %s" % ( + event["nickname"], event["message"]))