Guild Ban triggers wrong event
When I tested out my bot on a test server a few minutes ago, I realised that when banning a user, it's the guildMemberRemove event that fire, and not the guildBanAdd event.
I've a console.log on both events and only one was triggered.
11 Replies
Do you have the GuildBans intent
No
But was it normal to fire the other event ?
yes
So what's the difference between the 2 events ?
guildMemberRemove triggers when a person is no longer part of the guild
guildBanAdd triggers when a new entry is added to audit log for a member being banned
So both might be triggered when there's a ban ?
for kick guildMemberRemove would trigger, guildBanAdd would not
both WILL be triggered when there's a ban
since the member is no longer part of the guild
AND
the entry to audit log was added as the member was banned
I don't get why having 2 different events for that is usefull.
it's completely different
and this is a Discord issue
djs just emits it because it gets the event
directly from discord
guildMemberRemove is for more than bans
Oh it comes from discord ?
ok then
Thanks for the answers 🙂
the only internal event is userUpdate iirc
the rest is all from Discord directly