diff --git a/src/discord/queue.py b/src/discord/queue.py index 2c205fa..6c0aa0b 100644 --- a/src/discord/queue.py +++ b/src/discord/queue.py @@ -215,7 +215,10 @@ class MessageQueue: logger.debug("Found webhook ID in webhook_suspensions, nuking it.") await msg.wiki.remove_webhook_from_db(webhook_url, "Attempts to send a message to a webhook result in client error.", send_reason=False) for message in messages: - self._queue.remove(message) + try: + self._queue.remove(message) + except ValueError: + logger.exception("Message could not be found in the queue") self.webhook_suspensions[webhook_id].cancel() else: self.webhook_suspensions[webhook_id] = asyncio.create_task(self.suspension_check(webhook_url), name="DC Sus Check for {}".format(webhook_id))