Sign inSign up

wilzzu/botbob

By wilzzu

•Updated over 2 years ago

Advanced Discord bot with fully customizable features, AI integration, and multilingual support.

Image
0

295

wilzzu/botbob repository overview

Logo

⁠botBob - Multifunctional Discord Bot

⁠About

botBob is an advanced Discord bot built with the latest Discord.js version (v14)! It includes modular commands, AI integration and unique functionalities, like timeout voting and debt tracking. botBob was designed from the ground up to be fully customizable, enabling the user to edit every command, every string, and every value through the configs. The bot is built primarily for our private Discord server, but feel free to use it if any of the features sound useful to you!

GitHub Repository⁠

⁠Features

  • Vote Timeout
  • Debt Tracking
  • Custom User Responses
  • Respond to Specific Words
  • Rare Messages
  • AI integration using OpenAI through Rapid API
  • Fully Customizable Commands
  • Multilingual Support

⁠Setup

⁠Create a new Discord bot
  1. Go to https://discord.com/developers/applications⁠ and create a new application

  2. Select the Bot tab and enable SERVER MEMBERS INTENT and MESSAGE CONTENT INTENT

    Privileged Gateway Intents

  3. Navigate to OAuth2 -> URL Generator. Under SCOPES enable bot and under BOT PERMISSIONS enable Administrator

    Scopes and Permissions

  4. On the bottom of the URL Generator page you should see an invite link. Copy & paste it in your browser's search bar and invite the bot to your server

    Invite link

⁠Docker installation
  1. Either install the latest stable version:

    docker pull wilzzu/botbob
    

    or customize⁠ it first and build using:

    docker build --tag botbob .
    
  2. Start the bot using docker run with your environment variables⁠:

    docker run -d wilzzu/botbob \
       -e DISCORD_TOKEN=<YOUR_BOT_TOKEN> \
       -e DISCORD_CLIENT_ID=<YOUR_CLIENT_ID> \
       -e RAPID_API_KEY=<YOUR_RAPID_API_KEY> \
       -e MONGO_URI=<YOUR_MONGO_URI>
    

    or use --env-file to point to the path you stored your .env file. You can find more info here⁠.

⁠Environment Variables
NameRequiredDescription
DISCORD_TOKENtrueLog into the bot

You can find the bot's token under the Bot tab in the Discord Developer Portal⁠. Click on Reset Token to generate a new token.

Discord token


NameRequiredDescription
DISCORD_CLIENT_IDtrueDeploy slash commands

You can find the bot's Client ID under the OAuth2 -> General tab in the Discord Developer Portal⁠.


NameRequiredDescription
RAPID_API_KEYfalseAI integration

For this project, I used the OPEN AI by InfinitiSync⁠ API. You can try using other AI API's found on Rapid API⁠, but they are not guaranteed to work with the bot. To get the API key, subscribe to the API and copy the X-RapidAPI-Key.

Rapid API key


NameRequiredDescription
MONGO_URIfalseTimeout database

To keep track of how many times a user has been timed out, you will need to create a new database in MongoDB. Here's a tutorial⁠ to get you started. Once created, click on Connect -> MongoDB for VS Code and copy the URI. Lastly replace the <password> part with your password.

MongoDB URI

⁠Optional configuration

You can fully customize every aspect of botBob by modifying the config files found in /configs folder. Just edit the [name].example.json files and rebuild.

  • config.json file contains all the options, such as:

    • Selected language and prefix
    • Guild and channel ID's
    • Admin ID's
    • Timeout lengths and vote durations
    • Custom responses and rare messages
    • Rapid API URL and host
  • languages.json file contains every string the bot uses and their translations:

    • Languages
    • Command names and descriptions
    • Activities
    • AI Prompt
    • Error messages
⁠Enabling features
  • To enable MongoDB, set the useMongoDB field to true in config.example.json.
  • To enable Rapid API AI integration, set the aiResponses field to true in config.example.json.

[⚠ IMPORTANT]
When enabling these features, make sure their environment variables⁠ are passed to docker run.

⁠Custom languages

Create your own translations by copying a pre-existing language object in languages.example.json file, renaming it and changing the strings to suit your preferences. Then change the selected language in config.example.json file to your newly created one and rebuild.

⁠Commands

CommandOptionsDescription
/setupnullSetup channels
/timeout@userVote a user to be timed out
/debt@from @to <amount>Add debt to a user
/admin@userGive admin permissions to a user
⁠Modular commands

You can disable unneeded commands by deleting their command files at /commands/utility/[command].js and rebuilding.

⁠License

This project is licensed under the MIT⁠ license.

Tag summary

Content type

Image

Digest

sha256:86e6c7577…

Size

57.4 MB

Last updated

over 2 years ago

docker pull wilzzu/botbob