Add server GuildId

This commit is contained in:
Aadi Desai 2023-09-24 16:05:46 +01:00
parent 2e23cd3a01
commit 2f7ddf660f
Signed by: supleed2
SSH key fingerprint: SHA256:CkbNRs0yVzXEiUp2zd0PSxsfRUMFF9bLlKXtE1xEbKM

View file

@ -17,6 +17,7 @@ struct Data {
fresher: serenity::RoleId, fresher: serenity::RoleId,
gn_ch_id: serenity::ChannelId, gn_ch_id: serenity::ChannelId,
member: serenity::RoleId, member: serenity::RoleId,
server: serenity::GuildId,
} }
type ACtx<'a> = poise::ApplicationContext<'a, Data, Error>; type ACtx<'a> = poise::ApplicationContext<'a, Data, Error>;
@ -88,6 +89,12 @@ async fn poise(
.expect("MEMBER_ID not found") .expect("MEMBER_ID not found")
.parse() .parse()
.expect("MEMBER_ID not valid u64"); .expect("MEMBER_ID not valid u64");
let server = secret_store
.get("SERVER_ID")
.expect("SERVER_ID not found")
.parse::<u64>()
.expect("SERVER_ID not valid u64")
.into();
// Build Axum Router // Build Axum Router
use axum::routing::{get, post}; use axum::routing::{get, post};
@ -147,6 +154,7 @@ async fn poise(
fresher, fresher,
gn_ch_id, gn_ch_id,
member, member,
server,
}) })
}) })
}); });