mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
docs: change registration example to use global commands (#8454)
This commit is contained in:
@@ -72,7 +72,7 @@ const rest = new REST({ version: '10' }).setToken('token');
|
|||||||
try {
|
try {
|
||||||
console.log('Started refreshing application (/) commands.');
|
console.log('Started refreshing application (/) commands.');
|
||||||
|
|
||||||
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: commands });
|
await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
|
||||||
|
|
||||||
console.log('Successfully reloaded application (/) commands.');
|
console.log('Successfully reloaded application (/) commands.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ const rest = new REST({ version: '10' }).setToken('token');
|
|||||||
try {
|
try {
|
||||||
console.log('Started refreshing application (/) commands.');
|
console.log('Started refreshing application (/) commands.');
|
||||||
|
|
||||||
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: commands });
|
await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
|
||||||
|
|
||||||
console.log('Successfully reloaded application (/) commands.');
|
console.log('Successfully reloaded application (/) commands.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user