İspik
İspik
DIAdiscord.js - Imagine an app
Created by İspik on 7/15/2024 in #djs-questions
AuditLog Event for member timeouts.
Currently, I have this code to see what it gives me in return:
if(!oldMember.isCommunicationDisabled() && newMember.isCommunicationDisabled()) {
await sleep(1000)
const fetchedLogs = await newMember.guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.MemberUpdate,
user: newMember.user.id
})
console.log(fetchedLogs)
}
if(!oldMember.isCommunicationDisabled() && newMember.isCommunicationDisabled()) {
await sleep(1000)
const fetchedLogs = await newMember.guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.MemberUpdate,
user: newMember.user.id
})
console.log(fetchedLogs)
}
But I get nothing
GuildAuditLogs {
webhooks: Collection(0) [Map] {},
integrations: Collection(0) [Map] {},
guildScheduledEvents: Collection(0) [Map] {},
applicationCommands: Collection(0) [Map] {},
autoModerationRules: Collection(0) [Map] {},
entries: Collection(0) [Map] {}
}
GuildAuditLogs {
webhooks: Collection(0) [Map] {},
integrations: Collection(0) [Map] {},
guildScheduledEvents: Collection(0) [Map] {},
applicationCommands: Collection(0) [Map] {},
autoModerationRules: Collection(0) [Map] {},
entries: Collection(0) [Map] {}
}
Not exactly sure if I don't have an intent enabled or something else
7 replies