DiscordJS-Example/README.md

177 lines
3.6 KiB
Markdown
Raw Normal View History

2024-02-09 20:23:40 +00:00
# Getting started
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Discord utilizes different types of commands to interface with bots. The following explanations aim to explain these types.
2024-01-26 13:28:02 +00:00
2024-02-09 20:23:40 +00:00
## Slash Commands
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Simple text-based commands. Can be entered in any Text-Based-Channel.
2024-02-09 20:32:56 +00:00
Prefix message with a "Slash" (`/`) and begin typing the name of the command! This prefix and the styling as a code snippet will be used to highlight Slash Commands in this message.
2024-02-09 20:23:40 +00:00
2024-02-09 20:32:56 +00:00
For clarification, this will also highlight command options as "Slash Command only" by prefixing them with an underscore (`_`)
2024-02-09 20:23:40 +00:00
## Context Menu Commands
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
"One click" commands. Listed under context (right click) menus, under the group "Apps".
Ideally, clicking on Users or Messages, you can apply any type of command with the press of a button. Comes with the downside of lacking further input capabilities.
Under the list of names of any given command, there may be a quoted string. These are meant to highlight context menu capabilities for the current command, by showcasing the commands name in the quote.
# Reaction/Self Roles
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
## Name
2024-02-09 20:32:56 +00:00
`/self_roles`
2024-02-09 20:23:40 +00:00
## Description
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Enables users to self assign roles by reacting to a message, utilizing a bot for automated tasks
## Subcommands
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
### create
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Full names:
2024-02-09 20:32:56 +00:00
- `/self_roles create`
2024-02-09 20:23:40 +00:00
Description:
2024-02-09 20:36:44 +00:00
2024-02-09 20:23:40 +00:00
The bot writes a message with the given contents in the current channel, and then registers said message for self roles
Options:
2024-02-09 20:32:56 +00:00
- \_text: String
2024-02-09 20:23:40 +00:00
### register
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Full names:
2024-02-09 20:32:56 +00:00
- `/self_roles register`
2024-02-09 20:23:40 +00:00
- "Register self roles"
Description:
2024-02-09 20:36:44 +00:00
2024-02-09 20:23:40 +00:00
Fetches any existing message and registers it for self roles directly
Options:
2024-02-09 20:32:56 +00:00
- \_id: Discord Message ID
2024-02-09 20:23:40 +00:00
### remove
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Full names:
2024-02-09 20:32:56 +00:00
- `/self_roles remove`
2024-02-09 20:23:40 +00:00
- "Remove self roles"
Description:
2024-02-09 20:36:44 +00:00
2024-02-09 20:23:40 +00:00
Fetches any existing message, looks if it is registered for self roles and then unregisters it
Options:
2024-02-09 20:32:56 +00:00
- \_id: Discord Message ID
2024-02-09 20:23:40 +00:00
### add
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Full names:
2024-02-09 20:32:56 +00:00
- `/self_roles add`
2024-02-09 20:23:40 +00:00
- "Add role emoji pair"
Description:
2024-02-09 20:36:44 +00:00
2024-02-09 20:23:40 +00:00
Adds a new Role-Emoji-Pair to a given message. Reacting to said message with the given emoji yields the given role
Options:
2024-02-09 20:32:56 +00:00
- \_id: Discord Message ID
2024-02-09 20:23:40 +00:00
- role: Discord Role
- emoji: Unicode [or if accessible, a custom] Emoji
## Automated tasks
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Registered Messages will automatically:
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
- be unregistered during deletion
- be edited in case the bot owns said message. It will explain the given Role-Emoji-Pairs every time a new pair is added.
# Custom Voice Chat
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
## Name
2024-02-09 20:32:56 +00:00
`/custom_vc`
2024-02-09 20:23:40 +00:00
## Description
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Enables users to create a custom, temporary voice chat with full control over it
## Subcommands
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
### create
2024-02-09 20:32:56 +00:00
2024-02-09 20:36:44 +00:00
Full names:
- `/custom_vc create`
2024-02-09 20:23:40 +00:00
Description:
The bot creates a new voice channel with the given name and registers said channel for custom VC creation
Options:
2024-02-09 20:32:56 +00:00
- \_name: String
2024-02-09 20:23:40 +00:00
### register
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Full names:
2024-02-09 20:32:56 +00:00
- `/custom_vc register`
2024-02-09 20:23:40 +00:00
Description:
Fetches any existing voice channel and registers it for custom VC creation directly
Options:
2024-02-09 20:32:56 +00:00
- \_id: Discord Channel ID
2024-02-09 20:23:40 +00:00
### remove
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Full names:
2024-02-09 20:32:56 +00:00
- `/custom_vc remove`
2024-02-09 20:23:40 +00:00
Description:
Fetches any voice channel, looks if it is registered for custom VC creation and then unregisters it
Options:
2024-02-09 20:32:56 +00:00
- \_id: Discord Channel ID
2024-02-09 20:23:40 +00:00
## Automated tasks
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
Registered Voice Channels will automatically:
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
- be unregistered during deletion
- be deleted once all users left said channel
- grant full control over permissions, only within said channel, to the author
# TO-DO List:
2024-02-09 20:32:56 +00:00
2024-02-09 20:39:19 +00:00
> **NOTE**
> These lists can and will easily be appended to in the future. Any and all feedback is greatly appreciated!
2024-02-09 20:23:40 +00:00
## Planned features
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
- Automated alerts/reminders
- Removing pairs on reaction/self roles
## Quirks/Bugs
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
- Users are currently unable to overwrite permissions of temporarily generated custom VCs
## Changes
2024-02-09 20:32:56 +00:00
2024-02-09 20:23:40 +00:00
None