mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Update
This commit is contained in:
@@ -154,14 +154,7 @@ class MessagesProc:
|
|||||||
def get_message_history_with_thread(cls, message_id: str) -> list[dict]:
|
def get_message_history_with_thread(cls, message_id: str) -> list[dict]:
|
||||||
logger.info(f"HISTORY: {cls.MESSAGE_HISTORY}")
|
logger.info(f"HISTORY: {cls.MESSAGE_HISTORY}")
|
||||||
|
|
||||||
message = next((message for message in cls.MESSAGE_HISTORY if message["id"] == message_id), None)
|
return [m for m in cls.MESSAGE_HISTORY if m["thread_id"] == message_id or m["id"] == message_id]
|
||||||
if message is None:
|
|
||||||
return []
|
|
||||||
|
|
||||||
return (
|
|
||||||
[m for m in cls.MESSAGE_HISTORY if m["thread_id"] == message_id]
|
|
||||||
+ [m for m in cls.MESSAGE_HISTORY if m["id"] == message_id]
|
|
||||||
)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def on_message(cls, event: MessageEvent):
|
async def on_message(cls, event: MessageEvent):
|
||||||
|
|||||||
Reference in New Issue
Block a user