In order to use this example, please download node.js with a minimum version of v18
.
After this is done, please install yarn
(package manager) and tsc
(typescript compiler) using
npm install -g yarn tsc
In order to install this project and getting all packages, please run
git clone https://github.com/Luna-devv/discord.ts-example
cd discord.ts-example
yarn install
Note!
You always should run this command in a second terminal when working on this project
yarn tsc --watch
Before you can start the bot and go online, you have to follow some steps.
- Create a discord bot application in the developer portal. How to?
- Copy the token in the bot tab. DON"T SHARE IT
- Put the token into the
src/config.ts
file - Check
yarn tsc --watch
is running and usenode dist/app.js
🎉 Done, use . test
or /help
to test :)
Learn js and ts before and use brain, thanks