diff --git a/bot/exts/filtering/_filters/antispam/mentions.py b/bot/exts/filtering/_filters/antispam/mentions.py index 6d541a28c9..1f26163284 100644 --- a/bot/exts/filtering/_filters/antispam/mentions.py +++ b/bot/exts/filtering/_filters/antispam/mentions.py @@ -68,8 +68,8 @@ async def triggered_on(self, ctx: FilterContext) -> bool: # 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.")