Discord-Typescript-Template
Typescript template for a discord bot using discord.js.
Installation
Clone the repository
git clone https://github.com/Amily404/Discord-Typescript-Template.git
Install required depedencies
$ npm install
Install Typesript globally
$ npm install -g typescript
Getting Started
First of all, you will need to create a .env
file in the root directoy:
TOKEN = "YOUR_TOKEN"
GUILD = "YOUR_GUILD_ID"
Setting up a GUILD variable is only needed during development
Starting The Bot
Once you completed all the steps above, all you have to do is start the app:
$ npm run start
Registering Slash Commands
To register all slash commands located in ./src/commands
, send !setup
in a server where you added the bot.
If a guild id is provided in the
.env
, commands will register for that guild specifically. Remove it to register them application wide.