From 85fa8cf9f319c5db16d212b02987fcd051cf19fa Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Mon, 19 Aug 2024 14:48:47 +0900 Subject: [PATCH] fix: set activity with ClientOptions (#520) --- src/main.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 204d9235..e2093440 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,6 +16,14 @@ const client = new Client({ GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.MessageContent, ], + presence: { + activities: [ + { + type: ActivityType.Custom, + name: `v${OM_VERSION}`, + }, + ], + }, }); client.on(Events.InteractionCreate, async (interaction) => { @@ -62,10 +70,6 @@ client.once(Events.ClientReady, async (client) => { leave.definition, skip.definition, ]); - client.user.setActivity({ - type: ActivityType.Custom, - name: `v${OM_VERSION}`, - }); }); function shutdown() {