fix sanity check
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user