fix sanity check

This commit is contained in:
Klemek
2022-09-02 10:22:12 +02:00
parent d8e9e48a13
commit cb37b052c9
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -66,8 +66,8 @@ class ChannelLogs:
is_empty = self.last_message_id is None
try:
if is_empty:
sanity_check = len(await channel.history(limit=1).flatten())
if sanity_check != 1:
sanity_check = len([message async for message in channel.history(limit=1)])
if sanity_check < 1:
yield len(self.messages), True
return
# load backward
+1 -1
View File
@@ -116,7 +116,7 @@ def escape_text(text: str) -> str:
return discord.utils.escape_markdown(discord.utils.escape_mentions(text))
class FakeMessage:
class FakeMessage(discord.abc.Snowflake):
def __init__(self, id: int):
self.id = id