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