Intro
I've been asked to create a queue system/command for a channel, even though on the forums we have a couple queue systems available, through for example the creative usage of the quote system (link expired), I thought this would be a fun little project to play around with various stuff, Nightbot headers, Nightbot API, OAuth.
The code behind the system is available at: https://github.com/xgerhard/nbqueue
If you have improvements or issues feel free to post them there, or let me know in the comments here.
nbqueue
A basic queue system for Nightbot. The usage is pretty straight forward, !join and !leave for users to enter or leave the queue, the user can check their position in the queue with !position. Moderators can !open or !close the queue and pick a user from the queue with !next.
The command supports multiple queues, but there can only be one active. Only the active channel is joinable. Moderators can manage queues by using !q add $queueName or !q del $queueName, to switch to a different queue use !q set $queueName. To empty the queue a moderator can use !q clear, or remove one user by using !q remove $position, where $position is the position of the user in that specific queue (this position can be found by using !q list).
User commands
- join $message - Joines the current queue with optional message "$message", this message is displayed when the user will be picked from the queue
- leave - Leaves the current queue
- position - Displays the position from the user in the current active queue
- list - Displays a link to a webpage with the full list of users in the queue
- info - Displays the current queue information, if the queue is open and how many people are in it

