Adds eslint and linted & improved routing for interactions

This commit is contained in:
Michel Fedde 2025-06-17 20:37:53 +02:00
parent 83209f642c
commit 441715675c
35 changed files with 2091 additions and 463 deletions

View file

@ -10,7 +10,7 @@ export class CommandDeployer {
}
public async deployAvailableServers() {
const commandInfos = [];
const commandInfos: object[] = [];
this.client.Commands.allCommands.forEach((command) => {
commandInfos.push(command.definition().toJSON())
})
@ -27,11 +27,10 @@ export class CommandDeployer {
this.logger.log(`Started refreshing ${commandInfos.length} application (/) commands for ${serverId}.`);
// The put method is used to fully refresh all commands in the guild with the current set
const data = await this.client.RESTClient.put(
Routes.applicationGuildCommands(this.client.ApplicationId, serverId),
{ body: commandInfos },
await this.client.RESTClient.put(
Routes.applicationGuildCommands(this.client.ApplicationId, serverId),
{ body: commandInfos },
);
this.logger.log(`Successfully reloaded ${commandInfos.length} application (/) commands for ${serverId}.`);
}
}