Skip to content

Latest commit

Β 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

YotsubaCTF Discord Bot

CI License: MIT Rust

My imaginary friends hate to open CTFTime to see things πŸ’”. I also cannot open it everyday.

So I force Yotsuba do these tasks for us. πŸ€

Here's the Yotsuba if you don't know who she is. She is from the manga Yotsuba&! (read it, it's very fun).

Yotsuba

What It Does

Core CTF Ops

  • Browse CTFTime events (upcoming/current/completed), plus countdown and info lookups
  • Subscribe a server to event notifications with clean Discord embeds
  • Send a weekly CTF digest to a chosen channel
  • Search and browse writeups by keyword, event, category, or followed team
  • Follow a CTFTime team and post new results
  • Set reminders for events, timers, or recurring intervals

Optional Utilities

  • Cipher/encoding tools and hash calculators
  • Admin role mapping for command access control

Screenshots

Event Commands

Upcoming events

Upcoming events command

Next steps for an event

Next steps command

How updates are announced

Events and writeups are posted as separate notifications.

Events

Event notification

Writeups

Writeup notification

How it alerts

Plug in a Discord webhook and let your server scream at you the moment your bot (or anything else) gets nuked.

Alert

Grafana Dashboard

Grafana monitoring

Tech Stack

Area Tools
Core Rust (2024 edition), Twilight
Data PostgreSQL (SQLx), Redis, Moka
Observability Prometheus, Grafana, Loki, Alertmanager, Promtail
Ops Docker Compose

Getting Started

Prerequisites

Quick Start

  1. Clone the repository:

    git clone https://github.com/sotsuba/yotsubactf.git
    cd yotsubactf
  2. Configure environment:

    cp .env.example .env
    # Edit .env and fill in DISCORD_TOKEN and DISCORD_APPLICATION_ID
  3. Start the services:

    docker compose up -d

Development, CI/CD, and Deployment

Useful files:

Use Docker Compose for local or private hosting.

Standard Local Dev

docker compose up -d

Production (Local)

  • Production: docker compose -f docker-compose.prod.yml --env-file .env.prod up -d

Setup Notes

  1. Configure environment files: copy .env.example to .env.prod
  2. Migrations: run on startup inside each environment

Monitoring

Monitoring is off by default. Enable the full stack (Prometheus, Grafana, Loki, Alertmanager, Promtail):

docker compose --profile monitoring up -d

Dashboards:

Gateway and Scheduler dashboards are pre-provisioned in Grafana.

License

MIT @ sotsuba

About

πŸ€ YotsubaCTF is a Discord bot that watches CTFtime for you so you don't have to.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages