mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
ignore exception if pushing dupe msg on server join
This commit is contained in:
parent
66b8c7dd09
commit
c41e241fd8
@ -137,12 +137,15 @@ class Titan(discord.Client):
|
|||||||
"bot": ban.bot
|
"bot": ban.bot
|
||||||
})
|
})
|
||||||
await self.database.update_guild_member(member, False, True)
|
await self.database.update_guild_member(member, False, True)
|
||||||
for channel in guild.channels:
|
for channel in list(guild.channels):
|
||||||
chanperm = channel.permissions_for(channel.server.me)
|
chanperm = channel.permissions_for(channel.server.me)
|
||||||
if not chanperm.read_messages or not chanperm.read_message_history:
|
if not chanperm.read_messages or not chanperm.read_message_history:
|
||||||
continue
|
continue
|
||||||
async for message in self.logs_from(channel, limit=50, reverse=True):
|
async for message in self.logs_from(channel, limit=50, reverse=True):
|
||||||
await self.database.push_message(message)
|
try:
|
||||||
|
await self.database.push_message(message)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
await self.postStats()
|
await self.postStats()
|
||||||
|
|
||||||
async def on_server_remove(self, guild):
|
async def on_server_remove(self, guild):
|
||||||
|
Loading…
Reference in New Issue
Block a user