-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Description
Which package is this bug report for?
discord.js
Issue description
When we fetch the auto-moderation audit-logs (here AutoModerationUserCommunicationDisabled
), the typing of <GuildAuditLogsEntry>.targetType
returns "AutoModerationRule" when in fact it is "AutoModeration".
Code sample
client.on('messageCreate', async (message) => {
if (message.guild) {
const auditLogs = await message.guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.AutoModerationUserCommunicationDisabled
});
const firstAuditLog = auditLogs.entries.first();
console.log(firstAuditLog?.targetType);
}
});
Versions
Issue priority
Low (slightly annoying)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Not applicable