Coder Social home page Coder Social logo

olivierpierre / discord-office-hours-queue-bot Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 45 KB

This is a simple bot for Discord, maintaining a queue of students for an online office hour session.

Home Page: https://github.com/olivierpierre/discord-office-hours-queue-bot

License: MIT License

Python 100.00%
discord bot office-hours

discord-office-hours-queue-bot's Introduction

Discord Office Hours Queue Bot

Discord is great for office hours, however with large groups it can be hard to maintain the order of arrival of students so that they can be helped in the correct sequence by the instructor.

This is a very simple bot for discord written in python, allowing to maintain an order of arrival for students. Upon arriving in the server the students start a private conversation with the bot and use the following commands:

  • !joinq to join the queue
  • !status to enquire for their position in the queue (0 being the first position)
  • !leaveq to leave the queue

The instructor/TAs also interract with the bot in private chat with these privileged commands:

  • !popq to select the next student to see (automatically dequeues the student)
  • !viewq to print the entire queue
  • !notify when the queue is empty, to have the bot privately message the instructor/TA once someone joins the queue
  • !notify-always works similarly to !notify, but does not need to be relaunched each time a signal is sent, i.e. it will always signal the instructor/TA when someone joins an empty queue
  • !clearq-yes-I-am-sure to clear the queue

You need to setup a role named TA in your discord server and give it to the person(s) you want to be able to use the privileged commands. A Discord server template with the correct setup is available here: https://discord.new/6tXKxc93fsm5.

Installation

Dependencies:

Python3 as well as the discord library:

pip3 install -U discord.py

Once your discord server is set up, get a token following these instructions: https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs

Write the token in a file named settings.json in the local folder, see for example settings-sample.json. Finally launch the bot as follows:

./bot.py

Obviously, the bot will only answer when it runs. Don't forget to setup a role named TA on your server and give it to the people supposed to use the privileged commands.

discord-office-hours-queue-bot's People

Contributors

olivierpierre avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

discord-office-hours-queue-bot's Issues

Improved notification

Additional notification setting that informs you whenever queue
switches from empty to non-empty, not only the first time. depending on
load, the user might want both, as is now, and notify without
explicitly enabling notification every time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.