Source code for Viobot, a Discord bot created for violetmillie.me's Discord community, focusing on providing the essentials to manage a guild.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 14:32:04 +01:00
src Rename slash-loader to command-loader in an attempt to remove confusion with slash refreshing, finish implementing slash refreshing 2026-11-09 14:32:04 +01:00
.env First commit 2026-11-08 18:12:38 +01:00
.gitignore First commit 2026-11-08 18:12:38 +01:00
bun.lock First commit 2026-11-08 18:12:38 +01:00
package.json Update && move CLI invite generator, create CLI command: refresh-slash to refresh slash commands. Create reusable slash command loader used by bot and refresh command 2026-11-08 19:56:31 +01:00
README.md Update incorrect directory names 2026-11-08 20:03:37 +01:00
tsconfig.json First commit 2026-11-08 18:12:38 +01:00

viobot-discord

Source code for Viobot, a Discord bot created for violetmillie.me's Discord community, focusing on providing the essentials to manage a guild.

Deployment

This section is written to be accessible to all users, so it covers every step.

The Discord Application

  1. Create a new Discord Application in the developer portal. The name of the application will be used for the bot, but can be changed later.

  2. Copy the 'Application ID' and paste it into the .env file. It should look like this:

APPLICATION_ID=THE_APPLICATION_ID_YOU_PASTED
DISCORD_TOKEN=
  1. Head over to the 'bot' section (Left side panel: Overview > Bot) and copy the token (you must reset it to view it!), and copy it into the .env file.

It should now look like this:

APPLICATION_ID=THE_APPLICATION_ID_YOU_PASTED
DISCORD_TOKEN=THE_TOKEN_YOU_PASTED
  1. If you are hosting the bot just for yourself, you should disable 'Public Bot' in the bot's page.

  2. Under 'Privileged Gateway Intents' enable 'Server Members Intent' (it allows to bot the view members of the guild).

Running the bot

Running the bot requires what we call a "runtime", it is simply a program able to run the files.

We have developed the bot using Bun which is able to run TypeScript files without friction, and will continue the guide using it.

  1. Install Bun if you haven't already done so, visit https://bun.sh/ and follow the install instructions for your operating system.

  2. Get the code. You can do so using Git, or by downloading an archive of the source code (see 2.2).

    2.1 With Git:

    $ git clone https://code.queersynergy.com/VioletMillie/discord-viobot.git && cd discord-viobot

    2.2 Using an archive:

  3. Run bun install in order to install the bot's dependencies. This step should be automatic and not raise any errors.

  4. Invite the bot to your server. You can run the command bun invite to retrieve an invitation link.

  5. You can now run the bot using $ bun bot.

Configuration

At the time of writing, all the configuration is hard coded, and you must either modify the code yourself or have you Discord guild set up in accordance to the code.

This will change once the main codebase is complete, and you will be able to configure it using commands on Discord.

Verification

  • The bot expects a channel '#verification' to exist with the correct permissions.

  • The bot expects a role called 'verified' to exist with the correct permissions.

Stream notifications

  • SoonTM