i have a basic Discord.js application in a nodejs project. When i launch my file via node client.js
everything works completly fine, the bot listens to messages/commands and events at all. But after compiling my app to an executable (with node module pkg) the client doesnt work anymore.
I debugged quiet a lot and the mysterious thing is that the ready
event does fire on the client, but nothing else. In my ready event i've got a client.user.setActivity('listening')
but that gives an error that it cannot read property of .setActivity
(Debug of client.user
was equal to null
).
You may ask why i want an executable to start my discord bot, well its my project :)