GuildAuditLogEntryCreate does not provide a guild
in the documentation it says that the GuildAuditLogEntryCreate event a guild provides. but it seems to always be undefined
the
guildAuditLogsEntry
does exist but i cant seem to get a guild value from that somehow
https://old.discordjs.dev/#/docs/discord.js/main/class/Client?scrollTo=e-guildAuditLogEntryCreateDiscord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
11 Replies
- 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!
- ✅
Marked as resolved by OPcode:
What’s does Guild return ?
undefined
show your event handler
Yeah probably the event handler
Seems good to me
What does guildAuditLogEntry returns ?
exactly what you would expect
Would you? :P
It's an array containing an
GuildAuditLogsEntry
and a Guild
.
Looks like you forgot the ...
before args
in your command handler in the once
branch.
(You seemingly forgot to change the parameter to the parent class to false in the handler's constructor and probably want to rename the class too)oh thx. yhea i missed that. it also seems that i set
once
to true in the event. prob cous i copied the ready event. this fixed it. thx