Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

vb2007/discordbot

Discord bot

Unit tests Update Wiki Commands CodeQL

A simple discord bot of mine developed with Node.js's discord.js package.

Invite the bot

You can invite the bot to your server using THIS link.

The bot requires administartor permissions (&permissions=8).

I'm hosting it, should be online 24/7.

Running the application

Setting up the bot

Do the following for setting up the application from sratch:

  1. Clone the repository.
  2. Create a .env file, or rename the existing .env.example file, and fill it out with the required data.
  3. Create a config.json file, or rename the existing config.json.example file, and fill it out with the required configuration settings.
  4. Like you would with any other node.js app, install dependencies with with the npm ci command.

Setting up nvm & the correct Node.js version

Warning

Currently, only one specific Node.js version - v24.8.0 - is supported officially. Issues might occur when running the bot on different versions.

If you're usure about your Node.js version, please refer to THIS documentation.

Setting up a database for the bot

Some of the bot's features require a MariaDB database.

If you already have a working database, and have filled up the connection details in the .env file for the connection, you can just run npm run create-tables. This will automatically create the tables based on the SQL queries that can be found in the sql folder.

Otherwise, please refer to THIS documentation for addittional help about setting up a database.

Running the bot

If everything above checks out, you can prepare for the first run:

  1. Deploy the slash (/) commands with npm run deploy. You might want to do this again if you modify / add commands.
  2. If you would like to verify your config.json file's syntax, you can run npm run verify-config.
  3. Finally, run the bot with npm run app.

Running it in the background

If you want to run the application on a Linux system in the background as a systemd service, you can follow THIS guide.

About

A simple discord bot of mine developed with node.js's discord.js library.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •