A Discord.js bot that provides a temporary voice channel system for your server. Users can join a dedicated voice channel to automatically create their own private room, with full control over it (kick, reject, set limits, claim ownership, etc.).
- Temporary Voice Rooms: Automatically creates a personal voice channel when a user joins "Join to Create Temp Room"
- Room Ownership: Each temp room has an owner who can manage it
- Reject / Unreject Users: Room owners can reject (ban) or unreject (unban) users from their room
- Claim Room: Claim ownership of an abandoned temp room when the original owner disconnects
- Set Room Limits: Set max/min member limits for your temporary room
- Server Stats: View server statistics with a clean embed
- Dev Setup Command: One command to set up the entire temp room system (category + channels)
- Custom Embed System: Rich, color-coded embeds for all bot responses (success, error, warning, info, moderation, welcome, goodbye, etc.)
- Automatic Command Handling: Commands are automatically loaded and deployed
- Event Handler: Events are automatically loaded from the
events/directory - Owner/Developer Permission System: Restrict commands to devs or server owners
- Hot Reload: Development mode with nodemon
src/
├── commands/
│ ├── dev/
│ │ └── create.js # /create — Sets up the temp room system
│ └── misc/
│ ├── claim.js # /claim — Claim an abandoned temp room
│ ├── ping.js # /ping — Bot latency check
│ ├── reject.js # /reject — Reject (ban) a user from your room
│ ├── unreject.js # /unreject — Allow a rejected user back
│ ├── setlimit.js # /setlimit — Set max/min members for your room
│ └── serverStats.js # /server-stats — Server information embed
├── config/
│ └── client.config.js # Loads DISCORD_TOKEN & CLIENT_ID from .env
├── events/
│ ├── interactionCreate/
│ │ └── handleCommands.js # Slash command router
│ ├── ready/
│ │ ├── 01deployCommands.js # Auto-deploy slash commands on startup
│ │ └── consolLog.js # Log bot online status
│ └── voiceStateUpdate/ # Handles temp room creation/deletion
├── handlers/
│ └── eventHandler.js # Dynamically loads all events
├── utils/
│ ├── areCommandsDifferent.js # Detects command changes for re-deploy
│ ├── client.js # Discord.js client with intents
│ ├── embeds.js # EmbedUtils class (success, error, warning, info, help, welcome, goodbye, moderation, serverInfo, userInfo, custom)
│ ├── getAllFiles.js # Recursive file/folder reader
│ ├── getApplicationCommands.js # Fetches registered slash commands
│ ├── getLocalCommands.js # Loads local command files
│ ├── getRoomOwner.js # Gets the owner of a temp room
│ └── isTempRoom.js # Checks if a channel is a temp room
└── index.js # Entry point
- Node.js 16.9.0 or higher
- npm or yarn
- A Discord bot token
-
Clone the repository
git clone https://github.com/YoussefSelk/Discord-Bot-GRAY-One-Tap.git cd Discord-Bot-GRAY-One-Tap -
Install dependencies
npm install
-
Create a
.envfile (see.env.example)DISCORD_TOKEN=your_discord_bot_token_here DISCORD_CLIENT_ID=your_discord_client_id_here
-
Update
config.json{ "devs": ["your_discord_user_id"], "owners": ["your_discord_user_id"] } -
Invite the bot to your server with the following OAuth2 scopes:
botapplications.commands
Required bot permissions:
- Manage Channels
- Connect / Move Members
- View Channels
- Send Messages / Embed Links
npm run devnpm startOnce the bot is online, use the /create command (dev-only) in your server. This will automatically create:
- A GRAY One Tap category
- A #gray-tempvc-info text channel (read-only for members, bot posts logs here)
- A Join to Create Temp Room voice channel
When a user joins the voice channel, a personal temp room is created. When all users leave, it is automatically deleted.
| Command | Description | Access |
|---|---|---|
/create |
Sets up the temp room system (category + channels) | Devs only |
/claim |
Claims ownership of an abandoned temp room | Everyone |
/reject <user> |
Rejects (bans) a user from your temp room | Room owner |
/unreject <user> |
Allows a rejected user back into your room | Room owner |
/setlimit <max> [min] |
Sets max (2-99) and optional min member limits | Room owner |
/server-stats |
Shows server statistics | Everyone |
/ping |
Shows bot latency | Owners only |
The bot uses a custom EmbedUtils class (src/utils/embeds.js) providing styled embeds:
| Method | Color | Usage |
|---|---|---|
EmbedUtils.success() |
🟢 Green | Successful actions |
EmbedUtils.error() |
🔴 Red | Errors |
EmbedUtils.warning() |
🟡 Yellow | Warnings |
EmbedUtils.info() |
🔵 Blue | Information |
EmbedUtils.help() |
🟣 Purple | Command help |
EmbedUtils.welcome() |
🟢 Green | Welcome messages |
EmbedUtils.goodbye() |
🔴 Red | Goodbye messages |
EmbedUtils.moderation() |
🟠 Orange | Moderation actions |
EmbedUtils.serverInfo() |
🔵 Blue | Server stats |
EmbedUtils.userInfo() |
🔵 Blue | User info |
EmbedUtils.custom() |
Any | Fully custom embed |
Add a file in src/commands/<category>/:
module.exports = {
name: "commandname",
description: "Command description",
deleted: false,
devsOnly: false,
ownersOnly: false,
options: [
{
name: "user",
description: "Target user",
type: 6, // User
required: true,
},
],
callback: async (client, interaction) => {
// Command logic
interaction.reply("Done!");
},
};Commands are automatically loaded and deployed on startup.
| Variable | Description |
|---|---|
DISCORD_TOKEN |
Your Discord bot token |
DISCORD_CLIENT_ID |
Your Discord application client ID |
| Key | Description |
|---|---|
devs |
Array of user IDs with developer access |
owners |
Array of user IDs with owner access |
- discord.js — Discord API wrapper
- dotenv — Environment variable management
- nodemon — Auto-restart in development
| Script | Description |
|---|---|
npm run dev |
Start in development mode (nodemon) |
npm start |
Start in production mode |
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
This project is licensed under the ISC License.
Made with ❤️ by YoussefSelk