Skip to content

Commit

Permalink
Always mark bot as online
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Mar 12, 2024
1 parent 384368f commit a88e7c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/main.rs
Expand Up @@ -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<id::GuildId>) {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a88e7c0

Please sign in to comment.