Skip to content

Commit 89849c7

Browse files
wookie184jb3
authored andcommitted
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
1 parent fec6c32 commit 89849c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bot/exts/filtering/_filters/antispam/mentions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ async def triggered_on(self, ctx: FilterContext) -> bool:
6868
# that is both not in the cache, and deleted while running this function.
6969
# In such a situation, this will throw an error which we catch.
7070
try:
71-
resolved = await bot.instance.get_partial_messageable(resolved.channel_id).fetch_message(
72-
resolved.message_id
71+
resolved = await bot.instance.get_partial_messageable(ref.channel_id).fetch_message(
72+
ref.message_id
7373
)
7474
except NotFound:
7575
log.info("Could not fetch the reference message as it has been deleted.")

0 commit comments

Comments
 (0)