From 663fb929e2215a9f125e5ca526b8bcdb522ea834 Mon Sep 17 00:00:00 2001 From: toast Date: Wed, 6 Dec 2023 08:38:19 +1100 Subject: [PATCH] Notify when bot is ready to be used --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index d158d36..461db72 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,16 @@ async fn on_ready( ) -> Result<(), Error> { println!("Connected to API as {}", ready.user.name); + serenity::ChannelId(865673694184996888).send_message(&ctx.http, |m| { + m.embed(|e| { + e.color(0xf1d63c) + .thumbnail(ready.user.avatar_url().unwrap_or_default()) + .author(|a| { + a.name(format!("{} is ready!", ready.user.name)) + }) + }) + }).await?; + let register_commands = std::env::var("REGISTER_CMDS").unwrap_or_else(|_| String::from("true")).parse::().unwrap_or(true); if register_commands {