diff --git a/src/botcore.rs b/src/botcore.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src/custom_mods.rs b/src/custom_mods.rs deleted file mode 100644 index e69de29..0000000 diff --git a/src/main.rs b/src/main.rs index 6448eeb..e7a11a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,40 +1,3 @@ -use dotenv::dotenv; -use twitch_irc::{login::StaticLoginCredentials, ClientConfig, SecureTCPTransport, TwitchIRCClient}; -use std::env; - -mod botcore; - -#[tokio::main] -pub async fn main() { - - dotenv().ok(); - let login_name = env::var("login_name").unwrap().to_owned(); - let oauth_token = env::var("access_token").unwrap().to_owned(); - - let mut botchannels = Vec::new(); - - for chnl in env::var("bot_channels").unwrap().split(',') { - botchannels.push(chnl.to_owned()); - } - - let config = ClientConfig::new_simple(StaticLoginCredentials::new( - login_name.to_owned(), - Some(oauth_token.to_owned()), - )); - - let (mut incoming_messages, client) = - TwitchIRCClient::<SecureTCPTransport, StaticLoginCredentials>::new(config); - - for chnl in botchannels { - client.join(chnl.to_owned()).unwrap(); - } - - let join_handle = tokio::spawn(async move { - while let Some(message) = incoming_messages.recv().await { - println!("Received message: {:?}", message); - } - }); - - join_handle.await.unwrap(); - +fn main() { + println!("Hello, world!"); }