Skip to content

Commit 7adf256

Browse files
committed
Fixed slash handler
1 parent 362b949 commit 7adf256

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/handlers/slashCommands.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ async function loadSlashCommands(client) {
1111
const command = await import(`../slashCommands/${slashCommands[i]}?${Date.now()}`);
1212
client.slashCommands.set(command.default.data.toJSON().name, command.default);
1313
console.log(chalk.greenBright(`[SLASHCOMMAND] Loaded ${chalk.yellow(slashCommands[i])} with command ${chalk.yellow(command.default.data.toJSON().name)}`));
14-
rest.put(
15-
Routes.applicationCommands(client.user.id),
16-
{ body: client.slashCommands.map(cmd => cmd.data.toJSON()) },
17-
);
1814
}
15+
rest.put(
16+
Routes.applicationCommands(client.user.id),
17+
{ body: client.slashCommands.map(cmd => cmd.data.toJSON()) },
18+
);
1919
}
2020

2121
async function reloadSlashCommands(client) {
@@ -25,11 +25,11 @@ async function reloadSlashCommands(client) {
2525
const command = await import(`../slashCommands/${slashCommands[i]}`);
2626
client.slashCommands.set(command.default.data.toJSON().name, command.default);
2727
console.log(chalk.greenBright(`[SLASHCOMMAND] Reloaded ${chalk.yellow(slashCommands[i])} with command ${chalk.yellow(command.default.data.toJSON().name)}`));
28-
rest.put(
29-
Routes.applicationCommands(client.user.id),
30-
{ body: client.slashCommands.map(cmd => cmd.data.toJSON()) },
31-
);
3228
}
29+
rest.put(
30+
Routes.applicationCommands(client.user.id),
31+
{ body: client.slashCommands.map(cmd => cmd.data.toJSON()) },
32+
);
3333
return slashCommands.length;
3434
}
3535

0 commit comments

Comments
 (0)