diff --git a/src/client.rs b/src/client.rs index 2d8914d..d7bad37 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,10 +1,8 @@ use std::env; -use dotenv::dotenv; -use twitch_irc::{ - login::StaticLoginCredentials, message::ServerMessage, ClientConfig, SecureTCPTransport, - TwitchIRCClient, -}; +use twitch_irc::login::StaticLoginCredentials; +use twitch_irc::message::ServerMessage; +use twitch_irc::{ClientConfig, SecureTCPTransport, TwitchIRCClient}; pub struct TwitchClient { pub incoming_messages: tokio::sync::mpsc::UnboundedReceiver, @@ -12,7 +10,6 @@ pub struct TwitchClient { } pub fn client_config() -> ClientConfig { - dotenv().ok(); let twitch_id = env::var("TWITCH_ID").expect("Failed to load twitch id"); let twitch_oauth = env::var("TWITCH_OAUTH").expect("Failed to load oauth"); diff --git a/src/commands/lastfm.rs b/src/commands/lastfm.rs index 210bf7e..d01c078 100644 --- a/src/commands/lastfm.rs +++ b/src/commands/lastfm.rs @@ -1,5 +1,4 @@ use crate::client::TwitchClient; -use dotenv::dotenv; use serde::{Deserialize, Serialize}; use std::env; use std::error::Error; diff --git a/src/commands/logs.rs b/src/commands/logs.rs index 4f64e46..448501b 100644 --- a/src/commands/logs.rs +++ b/src/commands/logs.rs @@ -1,4 +1,3 @@ -use dotenv::dotenv; use std::error::Error; use twitch_irc::message::PrivmsgMessage; diff --git a/src/commands/massping.rs b/src/commands/massping.rs index b3da201..fdfa0df 100644 --- a/src/commands/massping.rs +++ b/src/commands/massping.rs @@ -1,4 +1,3 @@ -use dotenv::dotenv; use std::error::Error; use twitch_irc::message::PrivmsgMessage; diff --git a/src/commands/ping.rs b/src/commands/ping.rs index 4746136..cb575e6 100644 --- a/src/commands/ping.rs +++ b/src/commands/ping.rs @@ -2,8 +2,6 @@ use crate::client::TwitchClient; use sysinfo::System; use std::error::Error; -use std::thread::sleep; -use std::time::Duration; use twitch_irc::message::PrivmsgMessage; pub async fn ping_command(m: &PrivmsgMessage, c: &TwitchClient) -> Result<(), Box> { @@ -23,7 +21,6 @@ pub async fn ping_command(m: &PrivmsgMessage, c: &TwitchClient) -> Result<(), Bo let uptime_hours = uptime_seconds / (60 * 60); let uptime_days = uptime_hours / 24; - let remaining_seconds = uptime_seconds % 60; let remaining_minutes = uptime_minutes % 60; let remaining_hours = uptime_hours % 24; diff --git a/src/commands/user.rs b/src/commands/user.rs index 1371ad0..5c0880e 100644 --- a/src/commands/user.rs +++ b/src/commands/user.rs @@ -1,4 +1,3 @@ -use dotenv::dotenv; use twitch_irc::message::PrivmsgMessage; use serde::{Deserialize, Serialize};