aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2025-10-07 22:04:25 +0200
committerGravatar Joe Banks <[email protected]>2025-10-21 19:13:35 +0100
commit89849c7aa5c5cd9a39594e8b54ce6d5b976a1642 (patch)
tree604a5afa38b62935185473ad1263a8f7f738e452
parentLower level of log about missing channel to info (diff)
Fix incorrect variable used in mentions logic
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
Diffstat (limited to '')
-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.")