mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Fix an issue where instead of new list of webhooks a reference was passed breaking broken message autoremoval
This commit is contained in:
parent
2e4a5e20e1
commit
c6a846fe18
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue