Skip to content

A Discord bot to manage CTF challenges in the CyberStudents Discord server

License

Notifications You must be signed in to change notification settings

cyberstudentsacademy/cyberstudents-ctf

Repository files navigation

CyberStudents CTF

A Discord bot to manage CTF challenges in the CyberStudents Discord server

Discord Server CI Tests Status GitHub Sponsors


To see the bot in action, join the CyberStudents Discord server and use the /help command to get started.

Features

  • Uses Discord interactions and components (e.g. slash commands, buttons, modals)
  • Hint request system with points
  • Cooldown system for flag submissions
  • Leaderboard for current round
  • Optional anonymous mode
  • Manage challenges and users (including blacklist)
  • Flag publishing protection
  • Solved discussion threads

Installing

To locally install the bot yourself (e.g. if you want to contribute or self-host), follow these steps:

Prerequisites

  • Node.js 16.11.0 or later
  • Yarn berry (v4)
  • A Discord application and bot
  • A PostgreSQL database (to run one locally, see here)

Setup

Once you've cloned the repository from GitHub, install the required Node dependencies.

yarn

Copy the .env.example file to a new .env file and the config.example.json file to a new config.json file. Then, fill out the environment variables and configuration values listed inside.

cp .env.example .env
cp config.example.json config.json

Push the Prisma schema to your Postgres database.

yarn push

# If you don't have a database yet, you can still generate typings
yarn generate

Compile the bot with tsc. Leave this terminal tab open while developing the bot. In production, you can use yarn build instead.

# Development (watch mode)
yarn build:dev

# Production
yarn build

Finally, you can run the bot using nodemon in development or pm2 in production.

# Development
yarn dev # nodemon
# or
yarn start # node

# Production
pm2 start dist/src/index.js

Contributing & Support

If you need support with the bot, feel free to contact GodderE2D on Discord after joining the server.

If you'd like to contribute to the bot, please review our code of conduct first. If you have a bug report, feature request, please open an issue. If you're interested in fixing a bug or adding a new feature, please open a pull request.

If you'd like to report a security vulnerability or otherwise want to contact me, please email me at goddere2d@bsr.gg or godderseesyou@gmail.com.

PR Guidelines

  • Please follow the conventional commits specification where possible (you may also use docs, chore or other headers).
  • Please use yarn test to ensure TypeScript, ESLint, and Prettier checks pass.
  • Please do not include out-of-scope changes in a PR, instead open a separate PR for those changes.
  • Please do not use translators to edit language files.

License

CyberStudents CTF is licensed under the Apache License 2.0.

About

A Discord bot to manage CTF challenges in the CyberStudents Discord server

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published