UNPKG

discord-bot-cli

Version:

An easy way to build a command-based discord bot with discord.js.

73 lines (72 loc) 1.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommandResultUtils = void 0; /** @internal */ exports.CommandResultUtils = Object.freeze({ // eslint-disable-next-line @typescript-eslint/no-explicit-any ok(command, result) { return { status: "ok", command, result }; }, // eslint-disable-next-line @typescript-eslint/no-explicit-any error(error) { return { status: "error", error }; }, noExecutor(command) { return { status: "no executor", command }; }, devOnly(command) { return { status: "dev only", command }; }, guildOnly(command) { return { status: "guild only", command }; }, unauthorizedUser(command) { return { status: "unauthorized user", command }; }, throttling(command) { return { status: "throttling", command }; }, clientPermissions(command) { return { status: "client permissions", command }; }, notPrefixed() { return { status: "not prefixed" }; }, commandNotFound() { return { status: "command not found" }; }, failParseArgInvalid(arg, got) { return { status: "parsing error", type: "arg", arg, reason: "invalid value", got, }; }, failParseArgMissing(arg) { return { status: "parsing error", type: "arg", arg, reason: "missing argument", }; }, failParseFlagUnknown(name) { return { status: "parsing error", type: "flag", reason: "unknown flag", name, }; }, failParseFlagInvalid(flag, got) { return { status: "parsing error", type: "flag", flag, reason: "invalid value", got, }; }, });