WhiteHat Hacker-Dark Team Member
DIAdiscord.js - Imagine an app
•Created by WhiteHat Hacker-Dark Team Member on 5/19/2025 in #djs-questions
AutoModerationActionExecution Event Not Firing
I’m currently building a moderation feature for my Discord bot using Discord.js v14, and I’m running into an issue where the AutoModerationActionExecution event is not firing at all. The goal is simple: whenever someone triggers an AutoMod rule (specifically blocking @everyone or @here mentions), the bot should send a temporary warning in the same channel and log it in another log channel using an embed. I’ve set up the listener like client.on(
Events.AutoModerationActionExecution, async (action) => { ... })
, and this is called inside my mentionGuard(client)
function during the bot’s startup. I’ve included all required intents in both the code and the Developer Portal — especially GuildModeration, which is required for AutoMod — and partials like Channel, Message, and GuildMember. The bot isn't verified, but has admin perms, and everything else (like slash commands, message content events, presence, etc.) works perfectly. The problem is, while I do get the console log saying the listener initialized, nothing ever happens when the AutoMod rule is triggered, no logs, no warning message, not even the console print from the event callback. The AutoMod rule itself works (message gets deleted), and I’ve also tried enabling "Send alert to channel" to see if it changes anything — but still no event is received by the bot. The rule IDs are correct and confirmed, and there are no errors thrown either. I’m trying to figure out whether there’s something I'm missing — like does the AutoMod rule have to send an alert for the event to fire? Are there known limitations or bugs around this event in Discord.js? Or is there something Discord-side that’s blocking this from being emitted to bots?13 replies