This bot is based off of the amazing Svelte Bot. It's hosted on a DigitalOcean App instance that will automatically detect any updates to the main
branch and deploy those changes.
- Environment: All secrets should be in a
.env
file. The template/example can be found at env.exampleNODE_ENV
: Any value other thanproduction
will set the bot use the dev IDs defined belowDISCORD_TOKEN
: The bot's private token from DiscordDEV_GUILD_ID
: Guide/server to test the bot inDEV_ADMIN_ROLE
: A role or user ID that the bot will consider an administratorDEV_HELP_CHANNEL
: Channel(s) to automatically thread any messages in (see the Threads functionality below)
src/config.ts
: The bots main config is located at src/config.tsADMIN_ROLES
: Role or user IDs that the bot will consider administratorsBOT_DEVS
: Currently the same functionality asADMIN_ROLES
HELP_CHANNELS
: Channel(s) to automatically thread any messages in (see the "Threads" functionality below)AUTO_THREAD_CHANNELS
: Currently the same values asHELP_CHANNELS
on_message_auto_thread
: Monitors the channels set inAUTO_THREAD_CHANNELS
and automatically turns any messages posted there into their own threads
thread
: These are commands to manage the autothreads created by the bot. They can be used by the person who initiated the thread or by people/roles defined in the role./thread rename
: Renames the current thread/thread solve
: Removes ? and adds ✅ at the beginning of the thread name and sets the archive duration to 1hr/thread archive
: Archive an active thread without marking it as solved/thread reopen
: Reopen a thread that's been accidentally marked as solved
Click on the links below to view the documentation on the different parts of the bot's tech stack:
All contributions are welcome, please try and make an issue first since most new features might warrant a discussion beforehand. Bug fixes probably won't need an issue and direct pull requests are ok for them.
-
Once you have the bot cloned then you need to make a .env file and fill out the fields:
cp .env.example .env
-
Run the bot with
yarn dev
Since there is no user facing code, prefer snake_case
for variables and function names wherever possible. Local constants follow the same, whereas global constants should be in SCREAMING_SNAKE_CASE
.
The bot uses the tsm module loader to transpile its Typescript code on the fly so there's no build step involved.
yarn start