Skip to content

Commit afa4507

Browse files
authored
fix: Always mark bot as online (#48)
1 parent 384368f commit afa4507

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ impl TypeMapKey for ConfigKey {
3737

3838
#[async_trait]
3939
impl EventHandler for Handler {
40-
async fn ready(&self, ctx: Context, ready: Ready) {
40+
async fn ready(&self, _ctx: Context, ready: Ready) {
4141
println!("Ready!");
4242
println!("Invite me with https://discord.com/api/oauth2/authorize?client_id={}&permissions=36700160&scope=bot", ready.user.id);
43-
44-
ctx.invisible().await;
4543
}
4644

4745
async fn cache_ready(&self, ctx: Context, guilds: Vec<id::GuildId>) {
@@ -209,7 +207,6 @@ impl EventHandler for Handler {
209207
// If user just connected
210208
if old.clone().is_none() {
211209
// Enable casting
212-
ctx.set_presence(None, user::OnlineStatus::Online).await;
213210
player.lock().await.enable_connect().await;
214211
return;
215212
}

0 commit comments

Comments
 (0)