troll Fabius

This commit is contained in:
2026-04-12 22:54:17 +02:00
parent 9b662232ff
commit b7e6f002f2
+13 -5
View File
@@ -35,13 +35,20 @@ pub struct Handler {
impl Handler { impl Handler {
pub fn new() -> Self { pub fn new() -> Self {
Self { contests: Contests::new(), ntfy_typing_last: Mutex::new(None), http_client: reqwest::Client::builder().tls_danger_accept_invalid_certs(true).build().unwrap() } Self {
contests: Contests::new(),
ntfy_typing_last: Mutex::new(None),
http_client: reqwest::Client::builder()
.tls_danger_accept_invalid_certs(true)
.build()
.unwrap(),
}
} }
} }
const NTFY_USER_ID: u64 = 313006809835372555; const NTFY_USER_ID: u64 = 313015629659635713;
const NTFY_URL: &str = "https://ntfy.sh/W5Zj9VRrGHJ4Nu8l"; const NTFY_URL: &str = "https://ntfy.noisruker.de/up123456789TestTest";
const NTFY_TYPING_TIMEOUT: Duration = Duration::from_secs(60); const NTFY_TYPING_TIMEOUT: Duration = Duration::from_secs(30);
#[serenity::async_trait] #[serenity::async_trait]
impl EventHandler for Handler { impl EventHandler for Handler {
@@ -69,7 +76,8 @@ impl EventHandler for Handler {
async fn message(&self, ctx: Context, msg: Message) { async fn message(&self, ctx: Context, msg: Message) {
if msg.author.id.get() == NTFY_USER_ID { if msg.author.id.get() == NTFY_USER_ID {
let res = self.http_client let res = self
.http_client
.post(NTFY_URL) .post(NTFY_URL)
.header("Title", "Ich habe deine Nachricht erhalten!") .header("Title", "Ich habe deine Nachricht erhalten!")
.header("Priority", "max") .header("Priority", "max")