-
Notifications
You must be signed in to change notification settings - Fork 9
/
deploy.js
21 lines (18 loc) · 974 Bytes
/
deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { stripIndents } = require('common-tags');
const { ChatInputCommand } = require('../../classes/Commands');
const { refreshSlashCommandData } = require('../../handlers/commands');
module.exports = new ChatInputCommand({
permLevel: 'Developer',
data: { description: 'Re-deploy ApplicationCommand API data' },
run: async (client, interaction) => {
const { member } = interaction;
const { emojis } = client.container;
// Calling our command handler function
refreshSlashCommandData(client);
// Sending user feedback
interaction.reply({ content: stripIndents`
${ emojis.success } ${ member }, [ApplicationCommandData](https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure "ApplicationCommandData on discord.com/developers") has been refreshed.
${ emojis.wait } - changes to global commands can take up to an hour to take effect...
` });
}
});