GuildAuditLogEntryCreate & Typescript

export const handleAuditDrag = async (entry: GuildAuditLogsEntry, guild: Guild) => {
if (entry.action === AuditLogEvent.MemberMove) {
// 1322328096036094023
const userName = entry.executor?.username
const channelId = entry.extra.channel
}
}
export const handleAuditDrag = async (entry: GuildAuditLogsEntry, guild: Guild) => {
if (entry.action === AuditLogEvent.MemberMove) {
// 1322328096036094023
const userName = entry.executor?.username
const channelId = entry.extra.channel
}
}
How Can I get typescript to stop complaining about the extra property? What check do I need to do so it knows it will return entry.extra.channel ?
2 Replies
d.js toolkit
d.js toolkit4w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Ypsilon
YpsilonOP4w ago
I have been looking at https://discord.js.org/docs/packages/discord.js/14.17.2/GuildAuditLogsEntry:Class but my knowledge of typescript just doesn't cut it. To figure this out. A ok so I wasn't the only running against this 😄 Thank you for the info ❤️

Did you find this page helpful?