Automod api

Hi is there integration for the automod api already or will there be?
8 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
DUCKODAS
DUCKODAS2y ago
it is possible to use the automod system in discord.js
d.js docs
d.js docs2y ago
class AutoModerationRuleManager (extends CachedManager) Manages API methods for auto moderation rules and stores their cache.
apzrn
apzrnOP2y ago
Is there an event for when an automod rule is triggered?
d.js docs
d.js docs2y ago
event (event) Client#autoModerationActionExecution Emitted whenever an auto moderation rule is triggered. (more...)
apzrn
apzrnOP2y ago
Which would that be? Ohhh thanks, is there a way to check if a server has any auto mod rules configured?
d.js docs
d.js docs2y ago
method AutoModerationRuleManager#fetch() Fetches auto moderation rules from Discord.
apzrn
apzrnOP2y ago
const embed = new Discord.EmbedBuilder()
.setTitle('**Auto Mod Guilds:**')
.setColor('#2E3192')
.setDescription(`${await bot.guilds.cache.map((guild) => guild.autoModerationRules.fetch({ cache: false }).enabled === 'true').size}`)
const embed = new Discord.EmbedBuilder()
.setTitle('**Auto Mod Guilds:**')
.setColor('#2E3192')
.setDescription(`${await bot.guilds.cache.map((guild) => guild.autoModerationRules.fetch({ cache: false }).enabled === 'true').size}`)
any idea why its coming back undefined? im trying to check how many guilds have it enabled How do i check if the guild has block words enabled?
Want results from more Discord servers?
Add your server