Before you begin, run through the discord.js getting started guide to register a new Discord bot application and add it to your server.
Once you have created a bot, added it to your server and retrieved a bot token, you can proceed:
- Install the prerequisites.
- Node.js v14
- Clone the repository.
- Checkout
master
. npm install
- Create a
.env
file in the root directory (See.env.example
).- Add your Discord bot token to the
DISCORD_BOT_TOKEN
environment variable.
- Add your Discord bot token to the
npm start
to start the bot.
- Create a new command in
src/commands
. - Register it in
src/index.ts
.- Note that users can execute the command with the
$<command_name>
format, for example$help
.
- Note that users can execute the command with the
See here.
See here.