ignore exception if pushing dupe msg on server join

This commit is contained in:
Jeremy Zhang 2018-02-18 01:15:11 +00:00
parent 66b8c7dd09
commit c41e241fd8

View File

@ -137,12 +137,15 @@ class Titan(discord.Client):
"bot": ban.bot
})
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)
if not chanperm.read_messages or not chanperm.read_message_history:
continue
async for message in self.logs_from(channel, limit=50, reverse=True):
try:
await self.database.push_message(message)
except:
pass
await self.postStats()
async def on_server_remove(self, guild):