From c6a846fe18a51690afe1f6c3a9c97ecbe37520d5 Mon Sep 17 00:00:00 2001 From: Frisk Date: Mon, 20 Jan 2025 23:36:21 +0100 Subject: [PATCH] Fix an issue where instead of new list of webhooks a reference was passed breaking broken message autoremoval --- src/discord/queue.py | 4 ++-- src/wiki.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/discord/queue.py b/src/discord/queue.py index efb9439..8f24a91 100644 --- a/src/discord/queue.py +++ b/src/discord/queue.py @@ -253,9 +253,9 @@ class MessageQueue: break def report_lingering_messages(self): - """Report and delete items marked as lingering for longer than 100 cycles""" + """Report and delete items marked as lingering for longer than 500 cycles""" for item in self._queue: - if item.add_linger() > 100: + if item.add_linger() > 500: item.self_destruct() logger.error(f"Could not deliver a message! Method: {item.method}, DM: {item.discord_message.__repr__()}") return # In case there are multiple messages that linger, remove them one by one every cycle diff --git a/src/wiki.py b/src/wiki.py index 3bbf2c7..47f115b 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -523,7 +523,7 @@ class Wiki: if message is None: break message.wiki = self - message_list.append(QueueEntry(message, webhooks, self)) + message_list.append(QueueEntry(message, webhooks.copy(), self)) messagequeue.add_messages(message_list) if old_highest_id != highest_id: # update only when differs self.statistics.update(last_action=highest_id)