Stumped with GuildAuditLogsEntry & TypeScript...

I'm kinda stumped with audit logs. I'm looking to get a few audit log entries of all recent actions of a user, and then create a simple embed. Here's an example of my problem:
const auditLogs = await guild.fetchAuditLogs({
before, limit: 100, user,
});

auditLogs.entries.forEach((entry) => {
switch(entry.action) {
case 'GUILD_UPDATE': // Type '"GUILD_UPDATE"' is not comparable to type '"ALL"'.
// ...
case 'MESSAGE_DELETE': // Type '"MESSAGE_DELETE"' is not comparable to type '"ALL"'.
// ...
}
});
const auditLogs = await guild.fetchAuditLogs({
before, limit: 100, user,
});

auditLogs.entries.forEach((entry) => {
switch(entry.action) {
case 'GUILD_UPDATE': // Type '"GUILD_UPDATE"' is not comparable to type '"ALL"'.
// ...
case 'MESSAGE_DELETE': // Type '"MESSAGE_DELETE"' is not comparable to type '"ALL"'.
// ...
}
});
What am I doing wrong?
2 Replies
Siris
Siris3y ago
Hi, this seems to be a bug with the typings. Do you mind creating an issue ticket on github for this?
Stev
StevOP3y ago
Will do!
Want results from more Discord servers?
Add your server