Adds group configuration
This commit is contained in:
parent
0d9cf6a370
commit
154002f6f3
16 changed files with 633 additions and 20 deletions
|
|
@ -38,13 +38,6 @@ export class DiscordClient {
|
|||
})
|
||||
|
||||
this.client.on(Events.InteractionCreate, async (interaction: Interaction) => {
|
||||
const command = this.commands.getCommand(interaction.commandName);
|
||||
|
||||
if (command === null) {
|
||||
Container.get<Logger>("logger").error(`Could not find command for '${interaction.commandName}'`);
|
||||
return;
|
||||
}
|
||||
|
||||
const method = this.findCommandMethod(interaction);
|
||||
if (!method) {
|
||||
Container.get<Logger>("logger").error(`Could not find method for '${interaction.commandName}'`);
|
||||
|
|
@ -77,7 +70,7 @@ export class DiscordClient {
|
|||
try {
|
||||
await command.execute(interaction)
|
||||
}
|
||||
catch (e: Error) {
|
||||
catch (e: any) {
|
||||
Container.get<Logger>("logger").error(e)
|
||||
|
||||
let userMessage = ":x: There was an error while executing this command!";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue