Test command

This commit is contained in:
2024-05-13 19:36:16 +02:00
parent 32b14d6f75
commit ecc37f060c
5 changed files with 53 additions and 5 deletions

View File

@@ -8,10 +8,11 @@ fn get_env(env: &'static str) -> String {
pub struct Config {
pub discord_bot_token: String,
pub discord_guild_id: u64,
pub discord_channel_id: u64,
pub discord_bot_activity: String,
pub telegram_bot_token: String,
pub telgram_channel_id: i128,
pub telegram_channel_id: i128,
}
@@ -19,10 +20,11 @@ impl Config {
pub fn load() -> Config {
Config {
discord_bot_token: get_env("DISCORD_BOT_TOKEN"),
discord_guild_id: get_env("DISCORD_GUILD_ID").parse().unwrap(),
discord_channel_id: get_env("DISCORD_CHANNEL_ID").parse().unwrap(),
discord_bot_activity: get_env("DISCORD_BOT_ACTIVITY"),
telegram_bot_token: get_env("TELEGRAM_BOT_TOKEN"),
telgram_channel_id: get_env("TELEGRAM_CHANNEL_ID").parse().unwrap(),
telegram_channel_id: get_env("TELEGRAM_CHANNEL_ID").parse().unwrap(),
}
}
}