mirror of
https://github.com/supleed2/nanobot.git
synced 2024-11-10 04:35:48 +00:00
Add server GuildId
This commit is contained in:
parent
2e23cd3a01
commit
2f7ddf660f
|
@ -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,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue