Passage en guild only

This commit is contained in:
Melaine Gérard 2024-10-30 13:14:32 +01:00
parent e95074ec29
commit 9393a0aed1
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
export interface IConfig {
token: string;
guildId: string;
}

View File

@ -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
}