From 9393a0aed1c72f8cc6b2ce74b6d1378dc8317860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melaine=20G=C3=A9rard?= Date: Wed, 30 Oct 2024 13:14:32 +0100 Subject: [PATCH] :sparkles: Passage en guild only --- src/base/interfaces/IConfig.ts | 1 + src/events/client/Ready.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/base/interfaces/IConfig.ts b/src/base/interfaces/IConfig.ts index 91abc2b..4a424e3 100644 --- a/src/base/interfaces/IConfig.ts +++ b/src/base/interfaces/IConfig.ts @@ -1,3 +1,4 @@ export interface IConfig { token: string; + guildId: string; } \ No newline at end of file diff --git a/src/events/client/Ready.ts b/src/events/client/Ready.ts index 31545d0..57a0765 100644 --- a/src/events/client/Ready.ts +++ b/src/events/client/Ready.ts @@ -17,9 +17,10 @@ export class Ready extends Event { const commands: object[] = this.getJson(this.client.commands); const rest = new REST({version: '10'}).setToken(this.client.config.token); + const guildId = this.client.config.guildId; const setCommands: any = await rest.put( - Routes.applicationCommands(this.client.user?.id!), + Routes.applicationGuildCommands(this.client.user?.id!, guildId), { body: commands }