new status message logs

main
Joeyrp 2 years ago
parent ba5cee8669
commit 3b81a2a6fa

@ -51,9 +51,10 @@ impl EventHandler for Handler
// private channels, and more. // private channels, and more.
// //
// In this case, just print what the current user's username is. // 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); println!("{} is connected!", ready.user.name);
utils::Logger::log_message(ctx, "Start up and connection successful!").await;
} }
// CODE TAKEN FROM EXAMPLE: // CODE TAKEN FROM EXAMPLE:
@ -63,6 +64,7 @@ impl EventHandler for Handler
async fn cache_ready(&self, ctx: Context, _guilds: Vec<GuildId>) async fn cache_ready(&self, ctx: Context, _guilds: Vec<GuildId>)
{ {
println!("Cache built successfully!"); 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. // it's safe to clone Context, but Arc is cheaper for this use case.
// Untested claim, just theoretically. :P // Untested claim, just theoretically. :P

Loading…
Cancel
Save