Known as @\bot
in our Discord server.
All PRs merged to main go live instantly! So if you'd like a new bot feature in this discord, add it yourself 👀
In all examples below, the prefix has been set to $
Displays the list of commands. Optionally adding a command name will make the bot respond with details about the named command.
Example:
$help prefix
Updates the prefix which bot will listen to for executing commands.
This prefix should be a single, non-alphanumeric character,
and it should not be one of @
, /
, or #
.
Example:
$prefix !
!help
Bans a word. If someone says this word, they get reassigned to a timeout role for 5 minutes. The second command unbans the currently banned word.
These commands can only be used by course staff.
Example:
$ban an*me
$unban
This command can be used by everyone to see what word if any is currently banned.
This command can be used by everyone to see the username of the person who has requested to ban the current banned world.
Deepfries a PNG image. Call with the PNG image attached.
Adds to the list of words that the bot will give feedback to when a post is particularly unhelpful.
Example:
$feedback unhinged refund integrity
This command resets the words which the bot will provide feedback to
- Mention: Mentioning the bot in a message to a server channel will have it reply to you with usage instructions
- Dad: Will randomly make dad jokes if you dare use the forbidden phrase "im" (or a derivate of that) in your discord message.
- Cooldown: Will inform you of your doubled autobot cooldown time when you mention autobot's cooldown
- TA Protection: Mentioning a TA with a question results in punishment!
To contribute just make a PR into the main
branch!
- Click
Fork
button in the top right of the GitHub page - Develop your feature and push to your fork
- Click the
Pull requests
tab and then theNew pull request
in your fork - Set the base repo and branch to be
ubccpsc/310bot-2021W
andmain
- Click
Create pull request
- Create a
.env
file and put it in the root directory of the project.- This file should never be committed to version control.
- Copy
.env.sample
to the new.env
file. - Modify as necessary to your environment.
yarn install
: Gathers all dependencies. This should be run at the start of development on a new clone in the root.yarn build
: Compiles the.ts
files to.js
files in thedist/
dir.yarn lint
: Lints thesrc/
files.yarn start
: Runs the bot.yarn watch
: Runs the bot and restarts it if any files are changed.
To create a Listener or Command:
- Create a file in either the
src/listeners
orsrc/commands
directory - Import the type
Listener
orCommand
from"@ubccpsc310/bot-base"
- Create a
default export
which is of typeListener
orCommand
Additionally, available to you is the function getDatabase()
which provides an object for storing arbitrary JSON in arbitrary tables.
More information is found in the bot-base
documentation.
See also