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 }