fix bug for forbidden channel

This commit is contained in:
Klemek
2021-03-16 16:00:20 +01:00
parent d092074ed5
commit 3e781c746f
3 changed files with 34 additions and 27 deletions
+1
View File
@@ -70,6 +70,7 @@ class ChannelLogs:
yield len(self.messages), False
self.last_message_id = channel.last_message_id
except discord.errors.HTTPException:
yield -1, True
return # When an exception occurs (like Forbidden)
yield len(self.messages), True
+1 -1
View File
@@ -154,7 +154,7 @@ class GuildLogs:
workers += [Worker(self.channels[channel.id], channel)]
warning_msg = "(this might take a while)"
if len(target_channels) > 5 and loading_new > 5:
warning_msg = "(most channels are new, this might take a looong while)"
warning_msg = "(most channels are new, this will take a long while)"
elif loading_new > 0:
warning_msg = "(some channels are new, this might take a long while)"
await code_message(