This repository contains a Discord example bot that consists of several commands:
Command | Description |
---|---|
-avatar | Displays the avatar of mentioned user |
-hi, -hello | Bot says hello |
-minecraft, -mc | Shows the server details of the given host(optional, default is: minecraft.emredemircivi.com) and port(optional, default is: 25565) |
-purge, -delete, -clear | Deletes specified amount of messages from the channel |
Open a terminal window and clone the repository. After cloning the repository change your directory to the repository directory.
Open up the config.json
file located in src/config
directory in your favorite text editor and put your Discord bot token to the token
field then save the file.
Install project dependencies by executing the following command:
npm install
We're done with installing dependencies.
If you're going to develop the project in your local environment you can type the following command to run the project in the development mode so when there is a change in your code, the application will restart automatically:
npm run watch
Type the following command to start the project in production mode:
npm run start