This repository houses the code for Fiveable Cram Support Bot
used in the Fiveable Discord server. Used whenever a customer has an issue with a purchase, and needs to contact a member of the Student Success team.
You dm the bot a message, which will start the question process. If a user does not respond quick enough or provides invalid data, the ticket creation is cancelled.
Command | Description |
---|---|
s!close [#channel] |
Close a ticket |
s!fetch <id> |
Fetch info and messages belonging to a ticket |
s!help [command] |
More info about a commmand |
s!stats |
Get info about the running bot instance |
s!reply <content> |
Reply to a ticket in a ticket channel. If ticket is closed, this will reopen. |
s!edit [--id=message-id] <content> |
Edit either a message sent to a user through the bot. Defaults to last sent. |
Please supply the following ENV variables in a .env
file in the root of the project.
Key | Description | Optional |
---|---|---|
TOKEN | The token belonging to the Discord bot | |
DB_URI | The database URI belonging to the MongoDB database |
|
PREFIX | Prefix for the bot | |
MODMAIL_CATEGORY | Main category to make new support threads in. |
|
GUILD | The guild this bot is meant to send new support threads in. |
|
MODMAIL_MAIN_CHANNEL | Main channel where info about tickets gets dumped. |
|
ADMIN_ID | ID of the admin of this bot. Bypasses all cooldowns/ratelimits |
โ๏ธ |
You can setup this project manually using the steps below, or using the include docker-compose file by doing docker compose up -d --build
. There is also an included heroku.yml
file for deploying to Heroku, which should build with the Dockerfile provided.
git clone https://github.com/ThinkFiveable/cram-support-bot.git
cd cram-support-bot
npm install
npm run build
Be sure to fill in the env variables as seen here
To start the bot, run this command:
npm run start
This license can also be found here
MIT License
Copyright (c) 2021 Fiveable
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.