A serverless optimized interaction based Discord bot. This is an all-in-one bot with multiple functions custom-built for university clubs and societies.
This bot is the new generation of the original KoalaBot project. This project is an open source discord bot with a development team of students and alumni from around UK and Europe.
- Verify
- ColourRole
- TwitchAlert
- Announce - Too intensive on Rate Limit
- Vote - Maybe replaced by Polls
- ReactForRole - Replaced by Discord Onboarding
- TextFilter - Replaced by Discord AutoMod
CloudFormation will be used to spin up the AWS services defined in the Cloud Architecture
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
The api, gateway, consumer and common crates are a Rust workspace built and deployed with
cargo lambda. Install the Rust toolchain here
and then install cargo lambda following its installation guide.
The ui directory is a Vue3/TypeScript frontend that requires Node.js (v22+). Install its
dependencies with:
$ cd ui
$ npm installThis project does not provide .env support by default to reduce package size for serverless.
You will instead have to provide the environment variables either as part of serverless deployment, or at runtime if running locally.
The environment variables required by the api/consumer/gateway crates are listed below:
DSQL_USER : The username used to connect to the Aurora DSQL database
DSQL_ENDPOINT : The endpoint hostname of the Aurora DSQL database
DISCORD_BOT_TOKEN : The secret token from the bot in the Discord developers portal
DISCORD_PUBLIC_KEY : The public key from the application in the Discord developers portal
DEPLOYMENT_ENV : The deployment environment name (e.g. dev or prod)
SQS_URL : The URL of the SQS queue used for audit events
The ui app additionally requires the following build-time variables:
VITE_KB_API_URL : The base URL of the deployed api
VITE_DISCORD_CLIENT_ID : The Discord OAuth2 client ID
VITE_GOOGLE_CLIENT_ID : The Google OAuth2 client ID
VITE_MICROSOFT_CLIENT_ID : The Microsoft OAuth2 client ID
You can use the Infrastructure as Code to spin up your serverless environment.
To build the Rust crates locally:
$ cargo lambda build --release --output-format zip -p api -p consumerTo run the ui app locally:
$ cd ui
$ npm run devThis project is licensed under the MIT License - see the LICENSE file for details
- KoalaBot Website: koalabot.uk
- KoalaBot Support Discord: discord.koalabot.uk
