feat; can now handle bedrock in the command

For #26
This commit is contained in:
silver 2024-11-30 00:44:36 +00:00
parent b55650b221
commit ee0c8f0987
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
4 changed files with 124 additions and 37 deletions

View file

@ -31,6 +31,7 @@ pub struct Config {
// tokens for discord and other API's
pub discord_token: String,
pub discord_token_minecraft: String,
pub minecraft_mcprofile: String,
// email settings
pub mail_smtp: String,
@ -58,6 +59,7 @@ pub fn get_config() -> Config {
let mut config = Config {
discord_token: "".to_string(),
discord_token_minecraft: "".to_string(),
minecraft_mcprofile: "".to_string(),
home: ".".to_string(),
database: "database.db".to_string(),
@ -82,6 +84,9 @@ pub fn get_config() -> Config {
if let Ok(x) = env::var("DISCORD_TOKEN_MINECRAFT") {
config.discord_token_minecraft = x.trim().to_string();
}
if let Ok(x) = env::var("MINECRAFT_MCPROFILE_KEY") {
config.minecraft_mcprofile = x.trim().to_string();
}
if let Ok(x) = env::var("EMAIL_SMTP") {
config.mail_smtp = x.trim().to_string();