GuildMemberAdd Event LIstener

I am trying to create an event listener using sapphire ts and discord js. I am trying to find a way to test the event without having to create and ban accounts repeatedly. I tried using the node.js event emitter like so
const emitter = new EventEmitter();
emitter.emit("GUILD_MEMBER_ADD, GuildMember)
const emitter = new EventEmitter();
emitter.emit("GUILD_MEMBER_ADD, GuildMember)
I tried using Client.emit() as a couple stack overflow but I got an error telling me that there was no method for client named emit. Any help is appreciated.
Solution:
Worked in my eval command. Make sure it's actually the Client instance you're trying to use emit() on. Inside a command file if you're extending the Command class, it would be ```ts this.container.client.emit()...
Jump to solution
2 Replies
Solution
b1nzee
b1nzee2y ago
Worked in my eval command. Make sure it's actually the Client instance you're trying to use emit() on. Inside a command file if you're extending the Command class, it would be
this.container.client.emit()
this.container.client.emit()
Clartye
ClartyeOP2y ago
THank you (:
Want results from more Discord servers?
Add your server