mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 07:05:36 +01:00
Update
This commit is contained in:
@@ -152,13 +152,7 @@ class MessagesProc:
|
|||||||
cls.MESSAGE_HISTORY = cls.MESSAGE_HISTORY[-cls.MESSAGE_LIMIT:]
|
cls.MESSAGE_HISTORY = cls.MESSAGE_HISTORY[-cls.MESSAGE_LIMIT:]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_message_history_with_thread(cls, message_id: str | None, current_deep: int = 5) -> list[dict]:
|
def get_message_history_with_thread(cls, message_id: str) -> list[dict]:
|
||||||
if message_id is None:
|
|
||||||
return []
|
|
||||||
|
|
||||||
if current_deep > 5:
|
|
||||||
return []
|
|
||||||
|
|
||||||
message = next((message for message in cls.MESSAGE_HISTORY if message["id"] == message_id), None)
|
message = next((message for message in cls.MESSAGE_HISTORY if message["id"] == message_id), None)
|
||||||
if message is None:
|
if message is None:
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user