A Discord bot that helps you move people to a specified private channel.
Made especially for streamers that have a Streaming VC and not want anyone to join it and talk, but it can be used for any purpose.
Currently a private bot, you can build it yourself and invite it to your server.
First, invite the bot to your server. Make sure to keep the default permissions, the bot must be able to:
- Join Voice channels
- Speak
- See text channels
- Send messages
- Move members
Once the bot joins, run the /bouncersetup show-status command to show the current status and set it up.
You have to define three channels for the bot to work properly by using the commands provided:
- Private voice channel: This is going to be the private voice channel the bot will help you move people to.
- Waiting voice channel: This channel should be publicly available, when people join this channel the bot will send a join request to the designated text channel.
- Text channel: This should be a private text channel where all the moderators and admins will have the power to accept or deny the join requests.
The bot will tell you if it doesn't have permission to perform actions in those channels.
Once you define the channels using the /bouncersetup set-private-vc, set-waiting-vc, and set-text-channel
commands, you'll get something like this when checking the status again:
You can then enable the bot by using /bouncersetup enable. Setup is done!
Once someone joins the private channel (can be anyone), a session will be started.
While people remain in that voice channel, the session will stay open. When people join the designated waiting room, the bot will send the join request to the designated text channel and join the private VC to play an audio cue to notify. This is helpful because Streamer Mode disables all notifications by default.
To prevent spam, the notifications have a 15 minute cooldown per user.
You have three options:
- Move: This moves the member to the private VC and clears their cooldown.
- Move + remember: This moves the member to the private VC, clears their cooldown, and also moves them again in case they disconnect and join the waiting room again. This lasts for the entire session.
- Ignore for this session: This will prevent any further notifications sent by this member for the rest of the session.
Once all people leave the private VC, the session will end. All remembered and ignored users will be cleared from the bot's memory and the bot won't notify of people joining the waiting room anymore.
A new session can be started by joining the private VC again.
The bot has some prerequisites before it can be installed:
First, you have to set up a database using a system that's supported by Prisma like MySQL or PostgreSQL. Read up here and set up the connection url in your .env file. In my case I use MySQL.
As with all Discord bots, you have to also create a new application if you haven't in Discord's Developer Portal and get your bot token and client id/secret.
Finally, for the audio notifications to work, you have to install FFmpeg. If you are having issues while installing the audio dependencies, check out this discord.js guide.
The instructions:
- Clone the repo
- Set up your database using the instructions provided above
- Set up your bot token and client id/secrets in the .env file located in
src
(rename it to .env instead of .env.example) - Install all the dependencies using your package manager of choice. For example:
npm install
- Navigate to the
src
folder and runnpx prisma push
to sync your database with the schema andnpx prisma generate
to generate your Prisma Client to be able to interact with the database - In the
src
folder runtsc
to compile all TypeScript into JavaScript - The output will be in the
dist
folder. You can run the bot by usingnode index.js
- Set the bot up using the tutorial above and enjoy!
- TypeScript
- Sapphire Framework
- Prisma