From 670bcd4e0ddc98aa74b416004ee536bd00f4d431 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sat, 11 Jun 2022 16:17:10 +0800 Subject: [PATCH] try to fix presence --- src/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 44446b2..91379a1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,11 +78,10 @@ client.once('ready', async () => { ) ); - if (client.user) { - client.user.presence.set({ - activities: [{ name: `Minecraft ${await getLatestMinecraft()}` }], - }); - } + client.user?.presence.set({ + activities: [{ name: `Minecraft ${await getLatestMinecraft()}` }], + status: 'online', + }); client.on('messageCreate', async (e) => { if (!e.content) return;