Emit command not emitting the event
Hello I'm making an 'Emit' command in order to test some event handlers. Here's my code :
The event is not triggered when I execute my command. Any idea please ?
23 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!your option is giving you user not userId
you dont need to find user
GuildMemberRemove need a member not a user right ?
do you have a error
No error
I'll log
memberToRemove
a sec
memberToRemove is working great, I have a GuildMember
object
do I need any specific intent on my client for emitting events ?
GuildModeration maybe
is its replying
Yes
![](https://cdn.answeroverflow.com/1138441321418338396/image.png)
logging to console? in your event file
No
it's not, so the event is not emmited actually
or not caught 😮
use trycatch in emitting
try {
//emit
} catch(err) {
console.log(err)
}
no log
are you sure your memberremove event works
when someone left normally
Ill try
it works : User InfluenceEvent left the guild.