2024-02-16 20:54:07 +00:00
|
|
|
use std::sync::Arc;
|
2024-02-14 12:22:29 +00:00
|
|
|
|
2024-02-16 20:54:07 +00:00
|
|
|
use serenity::http::Http;
|
2024-02-14 12:22:29 +00:00
|
|
|
|
2024-02-16 20:54:07 +00:00
|
|
|
pub async fn send_error(_http: Arc<Http>, msg: String) {
|
|
|
|
println!("ERROR: {msg}");
|
|
|
|
|
2024-02-14 12:22:29 +00:00
|
|
|
#[cfg(feature="RELEASE")]
|
|
|
|
match ChannelId::new(1199495008416440491)
|
2024-02-16 20:54:07 +00:00
|
|
|
.send_message(_http, CreateMessage::new().content(msg)).await {
|
2024-02-14 12:22:29 +00:00
|
|
|
Ok(_) => { return; }
|
|
|
|
Err(_) => { exit(-1) }
|
|
|
|
};
|
2024-02-16 20:54:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature="RELEASE")]
|
2024-02-14 12:22:29 +00:00
|
|
|
pub async fn hello(http: Arc<Http>) {
|
2024-02-16 20:54:07 +00:00
|
|
|
use serenity::http::Http;
|
|
|
|
|
2024-02-14 12:22:29 +00:00
|
|
|
let messages = [
|
|
|
|
"AAAAAAAAAAAAAAAAAAAA",
|
|
|
|
"Henlooo",
|
|
|
|
"Good day y'all!",
|
|
|
|
"May have crashed...",
|
|
|
|
"MOOOooo",
|
|
|
|
"Heyyyyy!",
|
|
|
|
"I'm baaaaack!",
|
|
|
|
"Whom'st have summoned the ancient one?",
|
|
|
|
];
|
|
|
|
|
|
|
|
let num = rand::random::<usize>() % messages.len();
|
|
|
|
|
|
|
|
let channel = ChannelId::new(780439236867653635);
|
|
|
|
if let Err(why) = channel.say(http, messages[num]).await {
|
|
|
|
print!("Error sending message: {:?}", why);
|
|
|
|
};
|
|
|
|
}
|