UNPKG

discord-commands-sync

Version:

A CLI tool to manage discord application commands

19 lines 690 B
import prompts from 'prompts'; import { guildIdInput, initialChoices } from '#lib/prompts'; export async function initialResponse() { let guildId = undefined; const response = await prompts(initialChoices); if (!response.commandType || !response.commandLevel) { process.exit(1); } const { commandType, commandLevel } = response; if (response.commandLevel === 'guild-command') { const guildResponse = await prompts(guildIdInput); if (!guildResponse.guildId) { process.exit(1); } guildId = guildResponse.guildId; } return { commandType, commandLevel, guildId }; } //# sourceMappingURL=initial-response.js.map