From 2f7ddf660fb59d314d887ed42dbe50f3b7b793e5 Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Sun, 24 Sep 2023 16:05:46 +0100 Subject: [PATCH] Add server GuildId --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.rs b/src/main.rs index da2a6e3..a50f16f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,6 +17,7 @@ struct Data { fresher: serenity::RoleId, gn_ch_id: serenity::ChannelId, member: serenity::RoleId, + server: serenity::GuildId, } type ACtx<'a> = poise::ApplicationContext<'a, Data, Error>; @@ -88,6 +89,12 @@ async fn poise( .expect("MEMBER_ID not found") .parse() .expect("MEMBER_ID not valid u64"); + let server = secret_store + .get("SERVER_ID") + .expect("SERVER_ID not found") + .parse::() + .expect("SERVER_ID not valid u64") + .into(); // Build Axum Router use axum::routing::{get, post}; @@ -147,6 +154,7 @@ async fn poise( fresher, gn_ch_id, member, + server, }) }) });