mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Added some sleep during guild join to make sure things are in order
This commit is contained in:
parent
b7b4187094
commit
6480df1b57
@ -103,6 +103,7 @@ class Titan(discord.Client):
|
|||||||
async def on_server_join(self, guild):
|
async def on_server_join(self, guild):
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
if not guild.me.server_permissions.administrator:
|
if not guild.me.server_permissions.administrator:
|
||||||
|
await asyncio.sleep(1)
|
||||||
await self.leave_server(guild)
|
await self.leave_server(guild)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -112,7 +113,7 @@ class Titan(discord.Client):
|
|||||||
await self.database.push_message(message)
|
await self.database.push_message(message)
|
||||||
for member in guild.members:
|
for member in guild.members:
|
||||||
await self.database.update_guild_member(member, True, False)
|
await self.database.update_guild_member(member, True, False)
|
||||||
banned = self.get_bans(guild)
|
banned = await self.get_bans(guild)
|
||||||
for ban in banned:
|
for ban in banned:
|
||||||
await self.database.update_guild_member(ban, False, True)
|
await self.database.update_guild_member(ban, False, True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user