From afa45075cf925860d46af4578f9d6a7133b69613 Mon Sep 17 00:00:00 2001 From: Max Isom Date: Mon, 11 Mar 2024 18:50:02 -0700 Subject: [PATCH] fix: Always mark bot as online (#48) --- Cargo.lock | 2 +- src/main.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c07503..0719f33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ dependencies = [ [[package]] name = "aoede" -version = "0.6.0" +version = "0.7.0" dependencies = [ "byteorder", "figment", diff --git a/src/main.rs b/src/main.rs index 0b5031e..d481d56 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,11 +37,9 @@ impl TypeMapKey for ConfigKey { #[async_trait] impl EventHandler for Handler { - async fn ready(&self, ctx: Context, ready: Ready) { + async fn ready(&self, _ctx: Context, ready: Ready) { println!("Ready!"); println!("Invite me with https://discord.com/api/oauth2/authorize?client_id={}&permissions=36700160&scope=bot", ready.user.id); - - ctx.invisible().await; } async fn cache_ready(&self, ctx: Context, guilds: Vec) { @@ -209,7 +207,6 @@ impl EventHandler for Handler { // If user just connected if old.clone().is_none() { // Enable casting - ctx.set_presence(None, user::OnlineStatus::Online).await; player.lock().await.enable_connect().await; return; }