mirror of
https://github.com/supleed2/nanobot.git
synced 2024-12-22 06:05:50 +00:00
Add GAIJIN_ID
secret to struct Data
+ init code
This commit is contained in:
parent
5a41806567
commit
cdde26e940
14
src/main.rs
14
src/main.rs
|
@ -16,6 +16,7 @@ struct Data {
|
|||
ea_key: String,
|
||||
ea_url: String,
|
||||
fresher: serenity::RoleId,
|
||||
gaijin: serenity::RoleId,
|
||||
gn_ch_id: serenity::ChannelId,
|
||||
member: serenity::RoleId,
|
||||
non_member: serenity::RoleId,
|
||||
|
@ -51,6 +52,13 @@ struct ManualMember {
|
|||
fresher: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Gaijin {
|
||||
discord_id: i64,
|
||||
name: String,
|
||||
university: String,
|
||||
}
|
||||
|
||||
#[shuttle_runtime::main]
|
||||
async fn poise(
|
||||
#[shuttle_secrets::Secrets] secret_store: shuttle_secrets::SecretStore,
|
||||
|
@ -86,6 +94,11 @@ async fn poise(
|
|||
.expect("FRESHER_ID not found")
|
||||
.parse()
|
||||
.expect("FRESHER_ID not valid u64");
|
||||
let gaijin = secret_store
|
||||
.get("GAIJIN_ID")
|
||||
.expect("GAIJIN_ID not found")
|
||||
.parse()
|
||||
.expect("GAIJIN_ID not valid u64");
|
||||
let gn_ch_id = secret_store
|
||||
.get("GN_CHANNEL_ID")
|
||||
.expect("GN_CHANNEL_ID not found")
|
||||
|
@ -147,6 +160,7 @@ async fn poise(
|
|||
ea_key,
|
||||
ea_url,
|
||||
fresher,
|
||||
gaijin,
|
||||
gn_ch_id,
|
||||
member,
|
||||
non_member,
|
||||
|
|
Loading…
Reference in a new issue