|
|
|
|
@ -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<GuildId>)
|
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
|