Closed megascatterbomb closed 1 year ago
Scratch what I just said, It wouldn't work with ts-node if you didn't invite the bot with that scope. 🤔
I have tested default launch config created by vscode. It's working fine. I recommend you to put breakpoints on importx and debug, what exactly processed there.
Reference for launch config: https://github.com/discordx-ts/discordx-bot/blob/main/.vscode/launch.json
Apologies for leaving this hanging, changing launch config to run ts-node in terminal is a sufficient fix.
Apologies for leaving this hanging, changing launch config to run ts-node in terminal is a sufficient fix.
you can instead run npm script.
What happened?
Launching this program via VS Code's "node" launch configuration causes commands to not register/become unregistered, however using the command line to launch node OR ts-node works fine.
Expected behavior:
Actual behavior:
Workaround
Changing the launch.json to simply execute ts-node is a workaround for this issue.
Reproduction
Reproduction repo: https://github.com/megascatterbomb/MegaAntiCheat/tree/discordx-issue
Using:
Relevant code is in ./local
Create a .env in ./local, set the following
From the root directory, execute in terminal
npm run build-local
Once built, the following commands can be used to start the program (again, from the root directory)The problematic VS Code launch configuration called "Run Local Client" is provided in the repo (.vscode/launch.json).
Package
discordx
Version
Stable
Relevant log output
Code of Conduct