Skip to content

Automates creation and cleanup of temporary voice channels, featuring role-based permissions, notifications, and also seamless server organization.

License

Notifications You must be signed in to change notification settings

KaloudasDev/discord-tempvoice-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ Temporary Voice Channel Manager

Discord Temporary Voice Channel Manager is a powerful Node.js Discord bot designed to automate the creation, management, and cleanup of temporary voice channels. Ideal for communities looking to streamline private voice rooms for support, gaming, donations, and more, while keeping their server organized and free of clutter.

This bot supports multiple configurable categories, role-based permissions, cooldowns, notifications, and periodic cleanup for a smooth user and staff experience.

✨ Features

  • Dynamically create temporary voice channels when users join configured "waiting" voice channels.
  • Automatic deletion of empty temporary voice channels after a short delay.
  • Support for multiple independent categories (e.g., Support, Mafia, Donate) with separate configs.
  • User cooldown system to prevent spam and abuse of channel creation.
  • Role-based permission overwrites applied to each temporary channel.
  • Sends notification embeds to specified text channels when users enter temporary channels.
  • Periodic cleanup every 5 seconds to ensure no empty temporary channels linger.
  • Fully configurable through environment variables for flexibility.
  • Modular, maintainable codebase with error handling for Discord API interactions.
  • Planned: Web dashboard for easier configuration, channel limits, multi-language support.

⚙️ How It Works

  1. Waiting Channels:
    Users join special "waiting" voice channels assigned per category. The bot detects this and creates a new private temporary voice channel with permissions granted to the user and designated staff roles.

  2. Cooldowns:
    Each user has a cooldown timer per category to avoid spamming channel creation. If the cooldown is active, the user is disconnected from the waiting channel.

  3. Active Channel Management:
    The bot tracks temporary voice channels per user and category, allowing users to rejoin existing empty channels or trigger new ones as appropriate.

  4. Automatic Cleanup:
    Temporary channels are deleted after being empty for a configurable short period, triggered both on voiceStateUpdate and periodic sweeps.

  5. Notifications:
    Notification embeds are sent to configured text channels alerting staff when users join or create temporary channels.

  6. Periodic Cleanup:
    Every 5 seconds, a cleanup job removes any empty temporary channels that might have been missed, maintaining server hygiene.

🛠️ Installation & Setup

Prerequisites

  • Node.js v18 or higher
  • A Discord bot with permissions: Manage Channels, Connect, View Channels, Move Members, Mute Members, Speak, and Use Voice Activity
  • A Discord server with appropriate roles and channels configured

Installation Steps

  1. Clone this repository:
git clone https://github.com/KaloudasDev/discord-temp-voice.git
cd discord-temp-voice
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory based on the provided .env.example and fill in your bot token, guild ID, channel IDs, role IDs, cooldowns, and colors.

  2. Start the bot:

node index.js

🔎 Usage

  • Have users join one of the configured waiting voice channels.
  • The bot will create a new private temporary voice channel under the specified category.
  • Staff roles configured will have permissions to moderate the channel.
  • Temporary channels delete themselves once empty after a short timeout.
  • Notifications are sent to specified text channels when users join temporary channels.

⚠️ Permissions & Role Setup

Ensure the bot has these permissions:

  • Guild-wide: View Channels, Manage Channels, Connect, Move Members, Mute Members, Speak

  • Temporary voice channels: Permission overwrites grant access to the channel owner and staff roles, deny everyone else.

  • The bot’s role must be higher in the role hierarchy than roles it manages for permission overwrites to succeed.

📣 Contributing

Contributions, suggestions, and bug reports are welcome! Please:

  • Fork the repo and create feature branches.
  • Write clear commit messages.
  • Open pull requests with detailed descriptions.
  • Report issues in GitHub Issues.

📋 License

This project is licensed under the MIT License. A permissive open-source license that allows you to freely use, modify, and distribute the software with minimal restrictions.
For full details, please refer to the LICENSE file.

✒️ Author

Created and maintained by KaloudasDev.
If you find this project useful, your ⭐️ star on the repository would be greatly appreciated!

About

Automates creation and cleanup of temporary voice channels, featuring role-based permissions, notifications, and also seamless server organization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published