From a364b85002661522a4fbc91d65982ac2cd58494d Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 18 Sep 2024 18:13:31 +0200 Subject: [PATCH] do not set rich presence in dev mode --- src/load.ts | 2 +- src/utils/client.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/load.ts b/src/load.ts index 5f59ec7..13277c3 100644 --- a/src/load.ts +++ b/src/load.ts @@ -12,7 +12,7 @@ export const run = async (isDev: boolean) => { // Client Discord.JS const client_name = "Client"; - await loadClient() + await loadClient(isDev) .then(async (client) => { if (isDev) { // Attach debugging listeners diff --git a/src/utils/client.ts b/src/utils/client.ts index a288919..1893ded 100644 --- a/src/utils/client.ts +++ b/src/utils/client.ts @@ -8,7 +8,9 @@ import { YoutubeiExtractor } from "discord-player-youtubei"; import { YoutubeWebTokenRoutine } from "./music"; /** Creation of the client and definition of its properties */ -export default async () => { +export default async (isDev: boolean) => { + const activities = isDev ? [] : [{ name: "/help", type: ActivityType.Watching }]; + const client: Client = new Client({ shards: "auto", intents: [ @@ -18,7 +20,7 @@ export default async () => { GatewayIntentBits.GuildVoiceStates, ], presence: { - activities: [{ name: "/help", type: ActivityType.Watching }], + activities, }, });