A Discord bot that creates temporary voice channels on demand and gives the channel creator a clean set of owner controls (lock/unlock, allow/block, rename, limit, region, chat toggles, and basic moderation). Channels auto-delete when empty, so your server stays tidy. Humans love clutter. This bot doesn’t.
- Join-to-Create (JTC): users join a designated “Join to Create” voice channel, the bot spawns a fresh temp VC, and moves them in.
- Auto-cleanup: temp VCs are deleted when empty.
- Owner controls: the channel owner can manage access, chat permissions, limits, region, and members.
- Persistent overrides: allow/block rules are stored in SQLite and re-applied when users rejoin (and survive unlock/reset workflows).
- Quick reference: optional one-time command quickref embed in the new VC.
- Admins configure a JTC voice channel with
!vc set_channel. - Optionally configure a category where temp VCs should be created with
!vc set_category. - Temp VCs are created open by default (connect + text-in-voice chat enabled for @everyone).
- A temp VC is tracked in SQLite (
temp_vcs). - When the last user leaves, the bot deletes the channel and its DB rows.
Owners can:
- Rename the channel (with an emoji prefix)
- Set user limit (0–99)
- Set voice region (or
auto) - Lock/unlock join access
- Allow/block specific users (persisted)
- Clear overrides (single user or all)
- Open/close text-in-voice chat
- Kick/mute/unmute/summon members
- Claim ownership when the original owner leaves
- Transfer ownership to a current member
All commands live under !vc (aliases: !temp_vc, !temp, !tv, !temp_voice).
!vc set_channel <voice-channel>
Sets the Join-to-Create voice channel.!vc set_category <category>(optional)
Sets the category where temp VCs are created.
!vc
Shows a quick command reference.!vc info
Shows a fuller reference including admin setup.
!vc rename <name>!vc limit <0-99>!vc region [name](run without args to list regions)!vc lock/!vc unlock!vc allow @user/!vc block @user/!vc clear [@user]!vc status!vc reset!vc openchat/!vc closechat!vc kick @user!vc mute @user/!vc unmute @user!vc summon @user!vc claim!vc transfer @user
Owner-only commands require you to be inside a managed temp VC and to be the recorded owner in the DB.
Minimum required permissions depend on features you use. For full functionality, grant the bot:
- Manage Channels (create/edit/delete VCs, set permissions, region, user limit)
- Move Members (move users into the new VC; kick/summon)
- View Channels
- Send Messages (for command responses in text channels)
- Embed Links (for pretty embeds)
- Read Message History (optional but helpful)
- Connect / Speak (not required unless you add voice audio features later; this bot does not play audio)
Also, enable privileged intents in the Discord Developer Portal:
- Server Members Intent (this repo enables
intents.members = True) - Message Content Intent (this repo enables
intents.message_content = True)
- Python 3.11
- A Discord bot application + token
- (Optional) Conda, if you want to use
environment.yml
git clone <your-repo-url>
cd temp-vc
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txtOr with conda:
conda env create -f environment.yml
conda activate tempvoiceCreate a .env file (same folder as requirements.txt) using .env.example as a template:
DISCORD_TOKEN="your_token_here"
# Optional:
TV_DB_PATH="data/tempvoice.sqlite"python -m src(or)
python src/main.pyOn startup the bot initializes the SQLite schema and logs in.
- Create (or pick) a voice channel named something like Join to Create.
- Invite the bot with the permissions listed above.
- In a text channel, as an admin:
!vc set_channel <your-join-to-create-voice-channel>- (optional)
!vc set_category <your-category>
- Test by joining the JTC channel.
SQLite database file is controlled by:
TV_DB_PATHenv var (default:data/tempvoice.sqlite)
Tables:
guild_settings: stores JTC channel id + optional category idtemp_vcs: tracks managed temp channels and their propertiestemp_vc_overrides: per-channel allow/block rules for users (connect/chat)
The bot uses WAL mode to reduce lock contention (PRAGMA journal_mode=WAL;).
In src/config.py:
DEFAULT_PREFIX(default!)PRIMARY_GROUP(defaultvc)GROUP_ALIASESRTC_REGIONSlist (includesauto)- Feature flags:
FF_SEND_JOIN_LEAVE_MESSAGES(defaultFalse)FF_QUICKREF_ON_OWNER_FIRST_JOIN(defaultTrue)
- When a temp VC is created, the joiner becomes the recorded owner in
temp_vcs.owner_user_id. - Owner checks are enforced via a DB lookup (
is_temp_vc_owner()). !vc claimlets someone else claim ownership only if the current owner is no longer in the channel.!vc transfersets a new owner only if that member is currently in the VC.
MIT. See LICENSE.