Discord bot for temporary voice channels
This repository has been archived on 2026-05-24. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Rust 92%
  • Dockerfile 6.3%
  • PLpgSQL 1.7%
Find a file
2026-05-24 23:46:13 +02:00
.github/workflows Remove the non-existent test job requirement 2023-05-15 01:14:56 +02:00
.idea Update GitHub workflows 2022-08-18 16:48:38 +02:00
.media Update README 2026-05-24 23:46:13 +02:00
docs Use royaldawn as page theme 2023-05-13 19:08:53 +02:00
migrations 🚧 Start work on presets 2021-07-12 00:56:33 +02:00
src Add stage channels support 2023-05-13 19:06:41 +02:00
.gitignore 🐳 Configure Docker for Bobbot 2022-03-23 17:37:35 +01:00
Cargo.lock Bump version to 1.1.0 2023-05-13 19:20:32 +02:00
Cargo.toml Bump version to 1.1.0 2023-05-13 19:20:32 +02:00
diesel.toml 💥 Did I forget to commit all this time? 2021-06-20 05:09:39 +02:00
Dockerfile Install libpq5 and libpq-dev after a first failing attempt at compilation 2023-05-15 03:18:04 +02:00
LICENSE.txt Add AGPL-3.0-or-later license 2020-07-30 22:51:48 +02:00
README.md Update README 2026-05-24 23:46:13 +02:00

Bob Bot

Discord bot for temporary voice channels

Ever wanted Mumble's temporary voice channels on Discord?
Bob can help you!

Warning

This project is no longer being used, so it might not be updated to use Discord's latest features.

It remains published here for historical and archival purposes.

Usage

The bot allows everyone on the server to create temporary voice channels in any category containing a text channel where slash commands are enabled.

Creating a temporary voice channel

To create a temporary voice channel, use the /build command while you're connected to voice chat:

/build {name}

A new temporary voice channel will be created, and you will be moved inside it by the bot.

You will have all permissions on that voice channel, as if the administrator of the server gave you the Manage Channel permission on it.

You can use that privilege to create a private voice channel for just you and a few friends, or to allow only a select number of people to talk.

Saving and loading presets

If you find yourself setting often the same permissions on a voice channel, you may want to store them in a preset so you will be able to load them in the future.

You can do so with the /save slash command:

/save {preset} {channel} [overwrite]

If you have the Manage Channels permission on the whole server, you can edit existing presets by specifying the {overwrite} argument.

You will then be able to load the preset with the /build slash command:

/build {name} {preset}

Presets are server-specific, so you don't have to worry about name collisions.

Configuring the bot

Setting the command channel

If you have the Manage Channels permission on the whole server, you'll be able to select the text channel where the bot will send notifications with the /config cc command:

/config cc {channel}

Setting the deletion time

If you have the Manage Guild permission on the whole server, you'll be able to choose the time that temporary channels will be able to stay empty for before they are deleted with the /config dt command:

/config dt {timeout}

Timeouts above 30 minutes are experimental and may cause slowdowns in the bot.

Add to your own server

You can add the bot to your own server by clicking on this link.

Please note that the bot must be an Administrator to work correctly, due to a peculiarity in Discord's permission system, which doesn't allow non-Administrators to create channels with the Manage permissions permission set.

Once you added the bot, set a command channel with /config cc and a deletion time with /config dt, or the bot will refuse to run.

Hosting your own instance

Prerequisites

Installation

  1. Download and compile the bobbot crate through cargo:

    $ cargo install bobbot   
    
  2. Create a Postgres role and database for Bob Bot:

    CREATE USER bobbot;
    CREATE DATABASE bobbot OWNER bobbot;
    
  3. Set the following environment variables, or create a .env file in the directory where you will execute the bot from:

    # Sets the logging level
    # https://docs.rs/env_logger/0.9.0/env_logger/
    export RUST_LOG=bobbot=info
    # Discord bot account token
    # https://discord.com/developers/applications/APPLICATION_ID/bot
    export DISCORD_TOKEN=AAAAAAAAAAAAAAAAAAAAAAAA.AAAAAA.AAAAAAAAAAAAAAAAAAAAAAAAAAA
    # Discord application id
    # https://discord.com/developers/applications/APPLICATION_ID/information
    export DISCORD_APPID=000000000000000000
    # URL of the Postgres database
    # https://diesel.rs/guides/getting-started#setup-diesel-for-your-project
    export DATABASE_URL=postgres://bobbot@/bobbot
    

Running

  1. The first time you will run the bot, you'll need to register its slash commands so users can call them.
    You can do so by running the bot once with the following environment variable set:

    $ DISCORD_REGISTER_COMMANDS=1 bobbot
    
  2. The next times you will run the bot, do so without the environment variable, or all commands will not work for up to an hour:

    $ bobbot
    

Updating

  1. You can update the bot by re-installing the crate with cargo:

    $ cargo install bobbot
    
  2. If the slash commands have changed, you might need to re-register the slash commands at the first run:

    $ DISCORD_REGISTER_COMMANDS=1 bobbot
    

Development

The project was developed using IntelliJ IDEA Ultimate with the IntelliJ Rust plugin, and includes some useful things to make debug easier.