Rename again

This commit is contained in:
supositware 2022-06-17 02:08:32 +02:00
parent d44fabf554
commit dfbc5630f8

View file

@ -42,6 +42,12 @@ const commands = [
const rest = new REST({ version: '9' }).setToken(token); const rest = new REST({ version: '9' }).setToken(token);
rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: commands }) if (process.argv[2] === 'global') {
.then(() => console.log('Successfully registered application commands.')) rest.put(Routes.applicationCommands(clientId), { body: commands })
.then(() => console.log('Successfully registered application commands globally.'))
.catch(console.error);
}
rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: commands })
.then(() => console.log(`Successfully registered application commands for the guild ${guildId}.`))
.catch(console.error); .catch(console.error);