summaryrefslogtreecommitdiff
path: root/src/bot_config.rs
diff options
context:
space:
mode:
authorArne Dußin2021-08-01 22:30:56 +0200
committerArne Dußin2021-08-01 22:30:56 +0200
commit0cd52d15fd782b515bf7ee917bb51d27740684f1 (patch)
tree520e2fb3c953b25d80ff60a5adf490115800ba88 /src/bot_config.rs
parent2f14f7edf29bd7010e5f8be8691a907c8ede1278 (diff)
downloadmatrix-zizek-bot-main.tar.gz
matrix-zizek-bot-main.zip
Login now works, "lend" from autojoin bot for referencemain
Diffstat (limited to 'src/bot_config.rs')
-rw-r--r--src/bot_config.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bot_config.rs b/src/bot_config.rs
index 2438c40..5fd2482 100644
--- a/src/bot_config.rs
+++ b/src/bot_config.rs
@@ -6,7 +6,7 @@ use config::{Config, ConfigError, File as ConfigFile};
/// Configuration struct of a bot
pub struct BotConfig
{
- user: String,
+ username: String,
password: String,
homeserver_url: String,
}
@@ -25,14 +25,14 @@ impl BotConfig
config.merge(ConfigFile::with_name("botconfig"))?;
Ok(Self {
- user: config.get_str("user")?,
+ username: config.get_str("username")?,
password: config.get_str("password")?,
homeserver_url: config.get_str("homeserver_url")?,
})
}
/// Get the username that should be used by the bot
- pub fn user(&self) -> &String { &self.user }
+ pub fn username(&self) -> &String { &self.username }
/// Get the password the bot should use to authenticate its user
pub fn password(&self) -> &String { &self.password }
/// Get the homeserver of the bot where it should send the login data to