summaryrefslogtreecommitdiff
path: root/README.md
blob: b41f03d697b3be247930636c89bc212564f37a29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Challe Anka

This project was created using `bun init` in bun v1.3.4. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.

## User Guide

Get access to the forum channel for a CTF competition by clicking the button sent by the bot.
Alternatively, ask an administrator to add you manually. Note that once you have joined the forum,
you can not leave it.

For each challenge you ponder upon in the competition, create a forum post with the challenge's
name as title. You are also encouraged can also add tag(s) for the categor(y/ies) of the challenge.
When you create the post, the bot will automatically add the `unsolved` tag. When a challenge is
solved, you can either remove the `unsolved` tag manually, or run the `/solve` command in the forum
post.

This way, all challenges that have not yet been solved can be filtered for in the forum. (Which is
way more interesting than filtering for the solved challenges).

## Administrator Guide

For each CTF competition, use the `/new` command. This will create a forum channel for the
competition as well as a pinned post called "general" with a message you specify. It will also post
a message containing a button in the channel the command is run in. This button can be clicked by
anyone who can see it to join the CTF forum.

If you need to re-create the button, use the `/create-button-message` from within a CTF forum,
specifying which channel it should be posted to. To do this you need the "Manage Permissions"
permissions on the forum channel and permission to send messages yourself in the targeted channel.

To manually add or remove players, you can use the `/add` and `/remove` commands respectively from
within a CTF forum. To do this, you need the "Manage Permissions" permission on the forum channel.

When the CTF competition is over, you should run the `/archive` command. This will move the CTF
forum to the first category called `Archive` or `archive` (if any), revoke everyone's write access,
and make it visible to everyone (by removing the explicit denial that was set during creation).

Note that this bot is completely stateless! That means that you do not have to fear de-syncing the
bot's view of the world. The way it determines if a forum is a CTF forum is that it checks if it has
a pinned post named general posted by the bot. You can rename, move around and delete CTF forums and
recreate the button message however much you like.