access_token
is defined in env variable
This commit is contained in:
parent
a28574dd77
commit
2e07297600
5 changed files with 24 additions and 17 deletions
src
|
@ -2,11 +2,12 @@ use twitch_irc::login::StaticLoginCredentials;
|
|||
use twitch_irc::ClientConfig;
|
||||
use twitch_irc::SecureTCPTransport;
|
||||
use twitch_irc::TwitchIRCClient;
|
||||
use std::env;
|
||||
|
||||
#[tokio::main]
|
||||
pub async fn main() {
|
||||
let login_name = "daphbot".to_owned();
|
||||
let oauth_token = "".to_owned();
|
||||
let login_name = "modulatingforcebot".to_owned();
|
||||
let oauth_token = env::var("access_token").unwrap().to_owned();
|
||||
|
||||
let config = ClientConfig::new_simple(
|
||||
StaticLoginCredentials::new(login_name, Some(oauth_token))
|
||||
|
@ -20,8 +21,8 @@ pub async fn main() {
|
|||
}
|
||||
});
|
||||
|
||||
client.join("daph".to_owned()).unwrap();
|
||||
client.say("daph".to_owned(), "Connected!".to_owned()).await.unwrap();
|
||||
client.join("modulatingforcebot".to_owned()).unwrap();
|
||||
client.say("modulatingforcebot".to_owned(), "Connected!".to_owned()).await.unwrap();
|
||||
|
||||
join_handle.await.unwrap();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue