UNPKG

discord-commands-sync

Version:

A CLI tool to manage discord application commands

52 lines 1.63 kB
import pc from 'picocolors'; export const initialChoices = [ { type: 'select', name: 'commandType', message: 'Choose what you want to delete?', choices: [ { title: 'Chat Input Command (Slash)', value: 'chat-input-command' }, { title: 'Message Command (Context Menu)', value: 'message-command' }, { title: 'User Command (Context Menu)', value: 'user-command' } ] }, { type: 'select', name: 'commandLevel', message: 'Choose the command level?', choices: [ { title: 'Global', value: 'global-command' }, { title: 'Guild', value: 'guild-command' } ] } ]; export const guildIdInput = [ { type: 'text', name: 'guildId', message: 'Please enter the guild id to delete command for' } ]; export const commandDeleteChoices = (commands) => { return [ { type: 'select', name: 'commandType', message: 'Which command you want to delete?', choices: commands.map((command) => ({ title: command.name, value: JSON.stringify({ ...command }) })) } ]; }; export const confirmObject = (command) => { return [ { type: 'confirm', name: 'confirm', message: `Confirm if you want to ${pc.red('DELETE')} ${pc.blue('COMMAND:')} ${pc.yellow(command.name)} (${pc.yellow(`${command.description ? `Description: ${command.description}` : 'No Description'}`)})` } ]; }; //# sourceMappingURL=prompts.js.map