A new bot, once again, for the UBC Launch Pad team. This time our focus is to use easily maintainable code and to make the bot as modular as possible. This will allow us to easily add new features and maintain the bot for a long time.
TO make this happen we are using existing libraries like discord.js and the code is written primariliy in JS. We hope to minimize the learning curve for new members and make it easy for them to contribute to the bot.
A Discord bot that helps manage the UBC Launch Pad community on Discord.
- Welcome new members
- Assign roles based on GitHub membership status to the Launch Pad GitHub organization
- store user GitHub usernames in a database
- sync GitHub usernames with Discord usernames
-
If you have windows then you must use WSL for Colony, No buts!
-
The following environment variables must be set (you can set them in a
.env
file in the root directory of the project and also note that the values of the environment variables depend on whether you are using your own personal bot/discord server/github app for testing or whether you are using the official Launchpad bot/discord server/github app):APP_ID=<> # Discord app ID DISCORD_TOKEN=<> # Discord bot token GUILD_ID=<> # Discord server ID PUBLIC_KEY=<> # Discord public key GITHUB_TOKEN=<> # GitHub app access token GH_APP_ID=<> # GitHub App ID GH_PRIVATE_KEY_PATH=gkey.pem LP_REPO_ID=<> # UBC Launch Pad GitHub repository ID LP_ORG_NAME=<> # UBC Launch Pad GitHub organization name LP_GITHUB_APP_CLIENT_ID=<> # UBC Launch Pad GitHub App client ID
-
If you are using your own discord bot for personal testing then make sure you add them to the Launchpad discord server with the appropriate scopes and permissions before proceeding (make sure your bot atleast has the
bot
andapplications.commands
scopes, and if you dont know what general permissions the bot needs then give it theAdministrator
permission but only after you get the approval to do so from Launchpad's discord moderator(s)) -
Run
npm install
to install dependencies -
Run
npm run build
to compile Typescript files to Javascript -
Run
npm run register
to make commands insrc/commands
usable on the bot you reference in your environment variables file -
Run
npm run start
to start your bot
- Setting up WSL (https://learn.microsoft.com/en-us/windows/wsl/install)
- Developing in WSL using VSCode (https://code.visualstudio.com/docs/remote/wsl-tutorial)
- Setting up a discord bot (https://discord.com/developers/docs/getting-started)
- Registering a github app (https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)
We welcome contributions to Colony! Please follow the steps below to get started.
- Fork this repository
- Create a new branch for your feature
- Commit your changes
- Push your changes to your fork
- Submit a pull request
- Woohoo! You're awesome!