diff --git a/README.md b/README.md index 0a3c0c5..ce97dbe 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,5 @@ test ModulatingForceBot `access_token = ` `bot_channels = ,` + +`prefix = ` \ No newline at end of file diff --git a/src/core/botinstance.rs b/src/core/botinstance.rs index f7f4f15..862fb4e 100644 --- a/src/core/botinstance.rs +++ b/src/core/botinstance.rs @@ -53,6 +53,7 @@ impl BotInstance { // let login_name = "modulatingforcebot".to_owned(); let login_name = env::var("login_name").unwrap().to_owned(); let oauth_token = env::var("access_token").unwrap().to_owned(); + let prefix = env::var("prefix").unwrap().to_owned().chars().next().expect("ERROR : when defining prefix"); /* Vector of channels to join @@ -81,7 +82,8 @@ impl BotInstance { let mut b = BotInstance { - prefix : '>', + //prefix : '>', + prefix : prefix, bot_channel : login_name , // tclient : TwitchClient { incoming_messages , client }, incoming_messages : incoming_messages,