diff --git a/src/util/debug.rs b/src/util/debug.rs index 39818d2..0cf34c4 100644 --- a/src/util/debug.rs +++ b/src/util/debug.rs @@ -5,17 +5,22 @@ use serenity::http::Http; pub async fn send_error(_http: Arc, msg: String) { println!("ERROR: {msg}"); - #[cfg(feature="RELEASE")] - match ChannelId::new(1199495008416440491) - .send_message(_http, CreateMessage::new().content(msg)).await { - Ok(_) => { return; } - Err(_) => { exit(-1) } + #[cfg(feature="RELEASE")] { + use serenity::all::ChannelId; + use serenity::all::CreateMessage; + use std::process::exit; + + match ChannelId::new(1199495008416440491) + .send_message(_http, CreateMessage::new().content(msg)).await { + Ok(_) => { return; } + Err(_) => { exit(-1) } }; } +} #[cfg(feature="RELEASE")] pub async fn hello(http: Arc) { - use serenity::http::Http; + use serenity::all::ChannelId; let messages = [ "AAAAAAAAAAAAAAAAAAAA",