add readme
This commit is contained in:
parent
165f96c94a
commit
2b81a621de
3 changed files with 30 additions and 1 deletions
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||||
anyhow = "1.0.79"
|
anyhow = "1.0.79"
|
||||||
async-trait = "0.1.77"
|
async-trait = "0.1.77"
|
||||||
chrono = { version = "0.4.31", features = ["serde"] }
|
chrono = { version = "0.4.31", features = ["serde"] }
|
||||||
clap = { version = "4.4.14", features = ["derive"] }
|
clap = { version = "4.4.14", features = ["derive", "env"] }
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
reqwest = { version = "0.11.23", features = ["json"] }
|
reqwest = { version = "0.11.23", features = ["json"] }
|
||||||
serde = { version = "1.0.195", features = ["derive"] }
|
serde = { version = "1.0.195", features = ["derive"] }
|
||||||
|
|
24
README.md
Normal file
24
README.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
ctftime discord bot
|
||||||
|
===
|
||||||
|
|
||||||
|
This bot updates a Discord server's upcoming event list with events from [CTFTime].
|
||||||
|
|
||||||
|
Usage
|
||||||
|
---
|
||||||
|
|
||||||
|
If my instance of the bot is still running, you can try adding it from here: https://discord.com/api/oauth2/authorize?client_id=1194435779531915355&permissions=17600776112128&scope=bot
|
||||||
|
|
||||||
|
To self host, you need a Rust toolchain.
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo run --release
|
||||||
|
```
|
||||||
|
|
||||||
|
Contact
|
||||||
|
---
|
||||||
|
|
||||||
|
Author: Michael Zhang
|
||||||
|
|
||||||
|
License: AGPL-3.0
|
||||||
|
|
||||||
|
[ctftime]: https://ctftime.org
|
|
@ -28,7 +28,12 @@ use crate::each_guild::each_guild_update_events;
|
||||||
#[derive(Debug, Parser)]
|
#[derive(Debug, Parser)]
|
||||||
struct Opt {
|
struct Opt {
|
||||||
/// Refresh rate (in seconds, defaults to 1 day)
|
/// Refresh rate (in seconds, defaults to 1 day)
|
||||||
|
#[clap(long = "refresh-rate")]
|
||||||
refresh_rate: Option<u64>,
|
refresh_rate: Option<u64>,
|
||||||
|
|
||||||
|
/// Discord bot token (reads from .env files as well)
|
||||||
|
#[clap(env, long = "discord-token")]
|
||||||
|
discord_token: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Clone)]
|
#[derive(Default, Clone)]
|
||||||
|
|
Loading…
Reference in a new issue