Mephisto5558 / Teufelsbot

A discord bot with multiple functions. Discord: https://discord.gg/yWwGTeppjR
MIT License
12 stars 3 forks source link
discord discord-bot discordjs

Teufelsbot

Activity License Lines of Code wakatime
CodeQL ESLint Quality Gate Status Crowdin
Security Rating Maintainability Rating Reliability Rating Duplicated Lines (%)
Bugs Vulnerabilities Code Smells Technical Debt

Discord Server

A discord.js v14 bot with Dashboard, multiple language support, a DB and many commands, in active development.
I am very open for pull requests, feature requests and everything else that helps me improve.
If you have any questions feel free to open an issue.

ToDo List | Bot Invite Link

Requirements

Node.js >=18.17.0 for prod
Node.js >=20.11.0 for dev
MongoDB set up

How to set it up

First, you clone the repository, by using git clone https://github.com/Mephisto5558/Teufelsbot.
Then, you need to install the required npm packages by running npm install .
Next, you need to create a env.json file. If you are hosting you bot code public, so everyone can see it, make sure they can't see this file or use a db in MongoDB. If you do this, you only need to set the MongoDB connection string as dbConnectionStr to process.env.
The env file/collection needs to have all keys from the env.json from the Templates folder in order to work.
You do not need to set the dev stuff, this is for development.
Then, you can create a config.json file. The template is in the Templates folder. You can skip this part if you don't want to set any config. The file will be created automatically then.

To run the Bot, run the index.js file.

You should be ready to go!

How to...

...add more languages and change translation texts

You can add changes on Crowdin or edit the language files in the Locales folder manually.

...add a new category

Create a new subfolder in the Commands folder. Name it how you want to name your category.
Then, create a new file in Locales/en/commands. Name it <category>.json (Replace <category> with the lowercase name of the folder you created in Commands).
Put this in the file:

{
  "categoryName": <category name>
}

This name will be displayed in some places, such as the help command.

...add a new command

Create a js file in one of the subdirectories of the Commands directory. Paste in the command.js template (found in the Templates folder.) Edit the properties. Many of them are optional so you could also remove them.
Then, you need to add the texts to Locales/en/commands. Use the command_translations.jsonc template.

Others

Note to the discord-api-types overwrite in package.json

The overwrite is required because in order to correctly overwrite discord.js Types.