Skip to content

Progressive-Victory/the-discord-bot

Repository files navigation

Progressive Victory Bot

This bot supports operations in the Progressive Victory Discord Server. To join, sign up on the website.

High-Level Overview

The Progressive Victory Discord bot runs in a Docker container deployed to the GCP Compute Engine. The bot uses:

  • pnpm to manage dependencies
  • MongoDB as a (document) database
  • Mongoose to interact with the database
  • express.js to implement RESTful APIs
    • NOTE: Currently, the PV bot doesn't define any RESTful API routes or handlers. The long-term vision is for the PV bot to act as a proxy for requests to the Discord API.

How to Contribute

To contribute to this repo, follow the contribution standards and instructions outlined on the project home page.

Setup Instructions

Installation

To get started we recommend you install the following software:

Follow the installation instructions for Node.js. Then, run the following:

npm install -g pnpm@latest-10

Finally, copy ./.env.sample to a file ./.env then edit the following vaules to be accurate:

DISCORD_TOKEN="<BOT_TOKEN>"
MONGODB_URI="<MONGODB_DEV_URI>"
PORT=<PORT>

You can ask the current tech director to provide these values.

Runing the Bot

The following actions must be completed to run the bot:

First, install all dependencies:

pnpm install

Build and run the bot:

pnpm dev

If the bot fails to run, check that all values are correct in the ./.env file. Otherwise, if everything succeeds, you should be able to send commands to the bot via the Dev Discord server.

Building the Documentation

To build the documentation, first run

pnpm doc

Then, open ./docs/index.html in a browser.

Commands

Commands help users interact with the server and manage its members:

state

State lead tools. This command has two subcommands:

  • ping - Allows our state leads to ping members' state roles
  • members - Gets a list of all members with a specified role

feedback

Directs members to the GitHub issues page to submit feedback and report bugs.

warn

Moderation tools. This command has four subcommands:

  • create - Add a warning to a user
  • update - Update an existing warning
  • remove - Remove an existing warning
  • view - Gets a filterable list of all warnings

settings

Admin tools for managing the server structure. This command has four subcommands:

  • warn channels - Configure which channels are used to manage warnings
  • report channels - Configure which channels are used to manage reports
  • welcome channel - Configure which channel to send join logs to
  • logging channels - Configure which channels logs are sent to

timeout

Moderation tool to timeout a user for a specified duration.

state-admin

Admin tools for managing the server structure for states. This command has two subcommands:

  • team set - Set a state's team channel and role
  • set - Set a state's channel and role

mute

Moderation tool to mute a user for a specified duration.

Context Menus

Context menus provide actions that can be taken on users and messages.

  • Report User: Report a user to the mods
  • Report Message: Report a message to the mods

References

About

Internal Discord bot for member utilities

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 14