From 3b81a2a6faab34b1410343815e29c48d8e2bf979 Mon Sep 17 00:00:00 2001 From: Joeyrp Date: Tue, 30 Jan 2024 21:16:39 -0500 Subject: [PATCH] new status message logs --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3ea2d10..9de7e2e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,9 +51,10 @@ impl EventHandler for Handler // private channels, and more. // // In this case, just print what the current user's username is. - async fn ready(&self, _: Context, ready: Ready) + async fn ready(&self, ctx: Context, ready: Ready) { println!("{} is connected!", ready.user.name); + utils::Logger::log_message(ctx, "Start up and connection successful!").await; } // CODE TAKEN FROM EXAMPLE: @@ -63,6 +64,7 @@ impl EventHandler for Handler async fn cache_ready(&self, ctx: Context, _guilds: Vec) { println!("Cache built successfully!"); + utils::Logger::log_message(ctx.clone(), "Cache built successfully!").await; // it's safe to clone Context, but Arc is cheaper for this use case. // Untested claim, just theoretically. :P