/Queue-Bot

Discord Queue bot used to handle your discord orders! Every 10 seconds it will scan your sellix orders for a "sellix service order", you can of course easilychange that. It will then save the orders into json and when someone presses the redeem button there will be an input asking for orderid then it will add the user to the queue!

Primary LanguagePythonApache License 2.0Apache-2.0

Discord - Queue Bot

Discord Queue bot used to handle your discord orders! Every 10 seconds it will scan your sellix orders for a "sellix service order", you can of course easily change that. It will then save the orders into json and when someone presses the redeem button there will be an input asking for orderid then it will add the user to the queue! The bot is adapted for my server but you can rebrand it easily. It also dms the owner of the bot when a new user redeems an order and has been added to the queue!

๐Ÿ’ฌ Discord ยท ๐Ÿ“œ ChangeLog ยท โš ๏ธ Report Bug ยท ๐Ÿ’ก Request Feature

โš™๏ธ Installation

  • Requires: Python 3.10+
  • Make a python virtual environment: python3 -m venv venv
  • Source the environment: venv\Scripts\activate (Windows) / source venv/bin/activate (macOS, Linux)
  • Install the requirements: pip install -r requirements.txt
  • Start: python3 main.py

๐Ÿ”ฅ Features

  • Nice Embeds
  • Improved Logging
  • Easy rebrand
  • Creates vouch messages
  • Can dm the user with his product (file/text)
  • Dms owner when new order gets redeemed
  • More to discover!
  • โ„น๏ธ .help - List all available commands
  • ๐Ÿ“จ .message - Send a message with a redeem button
  • ๐Ÿ—‘๏ธ .dele <order_id> - Remove an order from the queue
  • ๐Ÿ”‘ .add <order_id> <product> <quantity> <user> - Manually add an order to the queue
  • โณ .pend <order_id> - Marks an order as pending
  • ๐Ÿ” .deliver <order_id> - Marks an order as delivered
  • ๐Ÿงน .purge - Delete all messages sent by the bot in the queue channel
  • ๐Ÿ”ง .set <setting> <value> - Set various bot configurations. Use .set help for details.
  • ๐Ÿ”Ž .check /(user_ping)/(orderid) - Shows all pending orders in the Queue, can also check pending order for a user/orderid
  • โš™๏ธ .restart - Restarts the bot

๐Ÿ“น Preview

Queue Bot Help Command Queue Bot Queue System Queue Bot DM


โ— Disclaimers

  • I am not responsible for anything that may happen, such as API Blocking, Account Termination, etc.
  • This was a quick project that was made for fun and personal use if you want to see further updates, star the repo & create an "issue" here

๐Ÿ“œ ChangeLog

v0.0.1 โ‹ฎ 07/20/2024
! Initial release

v0.0.3 โ‹ฎ 07/23/2024
! Made branding easier by adding a custom embed color directly into config.json with formatter in case of misuse. Improved .deliver command to also dm the user once the product has been delivered, made it so that it works with a str/int e.g. .deliver order-123 hi@gmail.com, with a file: e.g. .deliver order-123 product.txt (must be an attachment) or without anything e.g. .deliver order-123

v0.0.4 โ‹ฎ 07/27/2024
! Efficiency: Reduced Sellix order checking interval from 15 to 10 seconds.
! Restart Command: Added `.restart` command for programmatic bot restarts.
! Check Command Improved to handle user-specific or order ID queries, displaying detailed pending orders.
! Deliver Command Added user ping handling if user ID is missing, and fallback for total prices.
! Embed Creation Standardized with dynamic footer text and image URL integration.
! Error Handling Enhanced error messages and user prompts.
! Helper Functions Updated format color function and ensured old unclaimed orders deletion at startup.
! Admin Checks Simplified predicate function for admin/owner command execution.
! Help Command Updated to reflect new and modified commands.
! Bug Fixes Improved embed character limit handling and accurate claimed orders management.

v0.1.0 โ‹ฎ 08/10/2024
! Added: .set command to update bot configurations directly from Discord.
! Added: .set help command to display available settings and usage instructions.
! Added: Role assignment functionality for redeemed, delivered, and deleted events.
! Added: Optional role removal functionality when an order is redeemed.
! Updated: Help command to include .set command details.
! Removed: .set_queue command, now part of the .set command.
! Fixed: Error handling for invalid settings or values in the .set command