/discord-bot-node

A basic discord-bot in Node.js to generate gif and do some basic stuffs

Primary LanguageJavaScript

Discord Bot

This Discord bot is created using Discord API in Node.js and JavaScript. It performs the following tasks:

Commands

  1. /ping: Replies with "Pong"
  2. /add [num1, num2]: Adds two numbers
  3. /gen-gif [query?]: Generates a GIF randomly or based on a search query

Setup

To use this bot, follow these steps:

  1. Clone this repository to your local machine.
  2. Install the required dependencies by running npm install.
  3. Create a new Discord application and obtain the bot token.
  4. Replace tokens in the env.js file with your tokens.
  5. Run the command npm run deploy. To deploy the discord commands on the server.
  6. Run the bot using npm run start. [Make sure to use node version >= 18.20.1]

Usage

Once the bot is running and added to your Discord server, you can use the commands mentioned above to interact with it.

Contributing

If you want to contribute to this project, feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License.