This bot currently supports the following commands
[!note] Subcommands ending with a question mark (?) are optional.
-
/mentee confirm
@username
Confirm a mentorship while also verifying whether the user has any penalties.
-
/mentee reminder
@username
<minutes?>
<channel?>
Assign the "Mentees" role and, optionally, send a reminder to the mentee about the minutes and/or channel.
-
/mentee conclude
@username
Conclude the mentorship and submit the feedback form. This will also remove the "Mentees" role.
-
/mentee penalty
@username
<reason?>
Penalize a mentee for absence. You can also add a custom reason if needed.
-
/mentee help
Provides information about the mentorship commands.
-
/remove penalty
Remove a penalty from a mentee
-
/poll
<question>
<"yes" option>
<"no" option>
<options?>
Create a basic Yes/No poll. Or, create one with multiple options (10 max).
[!note] For the basic (two options) poll, the first option should be "positive" and the second "negative". Adding more than two options will add numbers instead.
-
/info q
@username
Provide a specific user with tips for asking questions.
-
/info m
@username
Alert a specific user about the music bot commands.
-
/help
Offers comprehensive information on all available commands.
These instructions will help you install and run the project on your local machine for development.
To install the project locally, follow these steps:
-
Create an
.env
file and add the environment variables needed, you can find the environment variables you'll need in the.env.example
file. -
Install project dependencies by running the command:
pnpm install
To run the project locally, execute:
Note
The first time running may require re-execute the command.
pnpm run dev
The development server should reload on every file change.
Important
After creating new commands or making changes on any of the commands structure you'll need to redeploy them.
To create a new command, create a new file in the commands directory. The file name should match the name of the command. For example, to create a command called hello, create a file called hello.js
.
The command file should export both data
and execute
as seem here.
[!WARNING] Make sure you put every command file inside the
src/commands
folder or in it's subfolders.
To handle an event, create a new file in the events directory. The file name should match the name of the event. For example, to handle the messageCreate event, create a file called message-create.js
.
The event file should export both data
and execute
from each event file, as seem here.
[!WARNING] Make sure you put every event file inside the
src/events
folder or in it's subfolders.
Deployment is done automatically with GitHub Actions; If you need to redeploy it manually, follow these steps:
-
Install the Fly.io CLI from their website
-
Authenticate with FrontendCafe's Fly.io account.
flyctl auth login
-
Execute the deploy command
flyctl deploy --ha=false
After creating new commands or making changes on any of the commands structure (not the execute
function logic), you will need to run:
pnpm run register
Warning
If the NODE_ENV
variable is set to "production"
, it will deploy the commands globally to all servers were the bot is already invited.
To modify environment variables on Fly.io, run the following command:
flyctl secrets import < .env
Important
This will read your local .env
file and update all of the environment variables.
This project is licensed under the MIT License.