MCPcopy Index your code
hub / github.com/ArrowM/Queue-Bot

github.com/ArrowM/Queue-Bot @v1.0-first-rewrite

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0-first-rewrite ↗ · + Follow
590 symbols 1,321 edges 127 files 1 documented · 0% updated 5mo agov1.0-first-rewrite · 2024-06-19★ 385 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Running Locally

Clone the repository:

git clone https://github.com/ArrowM/Queue-Bot

Create or reuse a Discord bot application and invite it to your server. See Discord.js guide.

Update the .env file with your bot's TOKEN and CLIENT_ID.

Option 1: Install and run with Docker (recommended)

npm run dock

This will build the Docker image and run the bot in a container. The bot will automatically restart if it crashes.

Option 2: Manually install and run

Install Node.js.

Run the setup script (run each time you update the project):

npm run setup

Run the bot:

npm start

How to create and edit commands

Please reference the other files as examples, they follow very similar structures. These instructions are more geared towards pointing you to the files that will need to be added/updated.

Adding commands

  1. Add a new .command.ts file to the src/commands/commands directory. Commands should extend EveryoneCommand or AdminCommand.
  2. Add the new command class to the src/commands.command.loader.ts file.
  3. Update the README.md file and the help commands in the src/commands/help.command.ts file.

Adding command options

  1. Add a new .option.ts file to the src/options/options directory. Options should extend one of the base options at the bottom of the src/options/base-options.ts file.
  2. Update the src/options/options.loader.ts file.

Adding buttons

  1. Create a new .button.ts file in the src/buttons/buttons directory. Buttons should extend EveryoneButton or AdminButton.
  2. update the src/buttons/buttons.loader.ts file.

Util files

If the code for your new command is complex or re-usable, consider placing your logic a utility file in the src/utils directory.

Database changes

If you need to add or modify database tables or columns:

  1. Update the src/db/schema.ts file.
  2. If you add a new table, or need new querying methods, update the src/db/store.ts file and the src/db/queries.ts file.
  3. Run drizzle-kit generate in the terminal. The drizzle command will generate the necessary SQL migration files for you, which will then be applied with drizzle-kit push.

Misc

Please lint before pushing:

npm run lint

This project is designed to run without compiling thanks to @swc-node/register/esm.

Extension points exported contracts — how you extend this code

Handler (Interface)
(no doc) [12 implementers]
src/types/handler.types.ts
AutoCompleteOptions (Interface)
(no doc)
src/options/base-option.ts
BaseProperties (Interface)
(no doc)
src/types/interaction.types.ts
Button (Interface)
(no doc)
src/types/button.types.ts
NotificationOptions (Interface)
(no doc)
src/types/notification.types.ts
Command (Interface)
(no doc)
src/types/command.types.ts

Core symbols most depended-on inside this repo

get
called by 251
src/options/options/admin.option.ts
commandMention
called by 40
src/utils/string.utils.ts
clear
called by 38
src/commands/commands/clear.command.ts
toCollection
called by 33
src/utils/misc.utils.ts
queueMention
called by 22
src/utils/string.utils.ts
getScopedQueues
called by 21
src/utils/message-utils/parser.ts
createCondition
called by 19
src/db/store.ts
join
called by 18
src/commands/commands/join.command.ts

Shape

Class 218
Method 200
Function 157
Enum 8
Interface 7

Languages

TypeScript100%

Modules by API surface

src/db/store.ts51 symbols
src/utils/error.utils.ts46 symbols
src/db/queries.ts27 symbols
src/utils/string.utils.ts20 symbols
src/utils/display.utils.ts16 symbols
src/utils/member.utils.ts15 symbols
src/utils/message-utils/parser.ts11 symbols
src/utils/schedule.utils.ts10 symbols
src/utils/client.utils.ts8 symbols
src/options/base-option.ts8 symbols
src/db/db-scheduled-tasks.ts8 symbols
src/commands/commands/voice.command.ts8 symbols

For agents

$ claude mcp add Queue-Bot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact