aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2025-10-07 22:04:25 +0200
committerGravatar wookie184 <[email protected]>2025-10-07 22:04:25 +0200
commitd4347e2aacef4dfdd513ba5d73396a4d4a876ee2 (patch)
tree5c42a3e165f5859007a0273b6d046f7fe9d91b97
parentAdd `!exec` alias to clarify command behavior (#3392) (diff)
Fix incorrect variable used in mentions logicwookie184/fix-mentions-reply-resolving
resolved is always None here, as the logic is for the case when resolved is None. Instead we want to use the channel and message ID from ref directly, which are always defined here
-rw-r--r--bot/exts/filtering/_filters/antispam/mentions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/filtering/_filters/antispam/mentions.py b/bot/exts/filtering/_filters/antispam/mentions.py
index 6d541a28c..1f2616328 100644
--- a/bot/exts/filtering/_filters/antispam/mentions.py
+++ b/bot/exts/filtering/_filters/antispam/mentions.py
@@ -68,8 +68,8 @@ class MentionsFilter(UniqueFilter):
# that is both not in the cache, and deleted while running this function.
# In such a situation, this will throw an error which we catch.
try:
- resolved = await bot.instance.get_partial_messageable(resolved.channel_id).fetch_message(
- resolved.message_id
+ resolved = await bot.instance.get_partial_messageable(ref.channel_id).fetch_message(
+ ref.message_id
)
except NotFound:
log.info("Could not fetch the reference message as it has been deleted.")