Created to manage voice channel waiting rooms. This bot allows you to display the order of people waiting and easily pull them to another channel.
How to use
Note: If you only have 1 queue, you can skip the channel name argument.
Commands available to everyone
Function
Command
Description
Join
!j {channel name} {OPTIONAL: custom message}
Join or leave a text channel queue.
!j #waiting-room This is my custom message!
Help
!h {OPTIONAL: channel name}
Display all commands.
Commands available to moderators
Moderator commands are available to the server owner and users with any of the following roles: mod, moderator, admin, administrator. Roles containing these words will also grant priveledge, for example: mod boys. These keywords can have an s attached to the end and have any capitalization, for example: MODS.
Function
Command
Description
Create & Destroy Queues
!q {channel name} {OPTIONAL: size}
Create or destory a queue for a specified channel.
List Queues
!q
List the names of the existing queues.
Display a Queue
!d {channel name}
Display the members in a queue. These messages stay updated.
Pull from Voice
!s {channel name}
Add the bot to a voice queue. Then the bot can be dragged into another channel to automatically pull in the person at the front of the queue.
Pull from Text
!n {channel name} {OPTIONAL: amount}
Removes people from the text queue and displays their name.
Create a database for storing queues. Here's a the steps for Windows:
3a. Download Postgresql
3b. Run the installer. Use the default port. Skip Stack Builder. Remember the password you set, you will need it later.
3c. Open Windows start menu, search for and open SQL Shell (psql).
3d. Leave the default login values for Server, Database, Port, and Username.
3e. Enter the password you chose during installation.
3f. Create a new database. (The semicolon is important): CREATE DATABASE queue;
3g. Close command prompt.
Open the Queue Bot folder.
Modify config/config.json:
If you followed all of Step 3, you only need to update the REQUIRED fields in the table below.
REQUIRED Config Fields
Description
prefix
Command prefix (Default: !)
token
Bot token. Found in the Discord Developer Portal for the bot you created in Step 1. See image of token location below this table.
databasePassword
Database login password
Optional Config Fields
Description
databaseUsername
Database login username (Default: postgres)
databaseName
Database name (Default: queue)
databaseHost
Database host url (Default: localhost)
databaseType
Type of database for queue storage. (Default: postgresql)
gracePeriod
Number of seconds a user can leave the queue without being removed
permissionsRegexp
What server roles can use bot commands. Uses RegExp. Accepts "mod" and "mods" by default.
color
The color of bot messages.
Config Command Fields
Description
clearCmd
Command to clear the queue.
colorCmd
Command to change the color.
commandPrefixCmd
Command to change the command prefix.
displayCmd
Command to display a queue in a text channel.
gracePeriodCmd
Command to change the grace period.
helpCmd
Command to display the help information.
joinCmd
Command to join a text channel queue.
kickCmd
Command to kick users from a queue.
limitCmd
Command to change queue size limit.
modeCmd
Command to change the display messaging mode.
nextCmd
Command to pull the next user from a text channel.
Install Dependencies. Open commmand prompt in project directory (If you have the project open in file explorer, click on the directory bar, enter cmd, and hit enter). Enter npm i into command prompt. Keep the command prompt open.
Build the bot. In the same command prompt, enter npm run build.
Start the Bot. Enter npm start into command prompt. If you get an error at boot, there is something wrong in your config.json. When you close command prompt, the bot will stop.
Optional. Make the bot run in the background, so you don't need command prompt open.
9a. In command prompt, enter npm install pm2
9b. To start the bot, enter pm2 start bot.js --time
9c. To stop the bot, enter pm2 stop bot.js