From 6480df1b57b7c8d5e1d83149ce5c4a22b910fd0b Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 21 May 2017 20:40:34 +0000 Subject: [PATCH] Added some sleep during guild join to make sure things are in order --- discordbot/titanembeds/bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discordbot/titanembeds/bot.py b/discordbot/titanembeds/bot.py index ef76912..5a21feb 100644 --- a/discordbot/titanembeds/bot.py +++ b/discordbot/titanembeds/bot.py @@ -103,6 +103,7 @@ class Titan(discord.Client): async def on_server_join(self, guild): await asyncio.sleep(1) if not guild.me.server_permissions.administrator: + await asyncio.sleep(1) await self.leave_server(guild) return @@ -112,7 +113,7 @@ class Titan(discord.Client): await self.database.push_message(message) for member in guild.members: await self.database.update_guild_member(member, True, False) - banned = self.get_bans(guild) + banned = await self.get_bans(guild) for ban in banned: await self.database.update_guild_member(ban, False, True)