From 6ab89c1ba5609a2846353bf6b68a948762252db8 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 15 Jun 2017 21:42:41 -0500 Subject: [PATCH] Remove errant class creations/correct conversion of string to int --- cogs/picarto.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cogs/picarto.py b/cogs/picarto.py index 334042d..ef39eb9 100644 --- a/cogs/picarto.py +++ b/cogs/picarto.py @@ -58,8 +58,8 @@ class Picarto: if member is None: continue channel_id = self.bot.db.load('server_settings', key=s_id, - pluck='notifications_channel') or int(s_id) - channel = server.get_channel(channel_id) + pluck='notifications_channel') or s_id + channel = server.get_channel(int(channel_id)) if channel is None: channel = server.default_channel try: @@ -78,8 +78,8 @@ class Picarto: if member is None: continue channel_id = self.bot.db.load('server_settings', key=s_id, - pluck='notifications_channel') or int(s_id) - channel = server.get_channel(channel_id) + pluck='notifications_channel') or s_id + channel = server.get_channel(int(channel_id)) if channel is None: channel = server.default_channel try: @@ -283,6 +283,4 @@ class Picarto: def setup(bot): - p = Picarto(bot) - bot.loop.create_task(p.check_channels()) bot.add_cog(Picarto(bot))