Skip to content

Commit 80bfb88

Browse files
committed
hotfix: global command registration
1 parent 850c896 commit 80bfb88

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

index.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ const client = new Client({
2626
});
2727

2828
client.on('ready', async () => {
29-
console.info('Ready!');
30-
3129
const commandData = [];
3230

3331
// setup commands
@@ -58,16 +56,16 @@ client.on('ready', async () => {
5856
// clear guild commands
5957
// guild.commands.set([]);
6058
// console.log('Commands cleared');
61-
// const d = await guild.commands.fetch();
62-
// console.log(d);
6359
} else {
6460
// register global commands
65-
const data = await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
61+
const data = await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commandData });
6662

6763
// @ts-ignore
6864
console.info(`Successfully reloaded ${data?.length} global application (/) commands.`);
6965
}
7066

67+
console.info('Ready!');
68+
7169
if (!client.user) return;
7270

7371
client.user.setPresence({

0 commit comments

Comments
 (0)