UNPKG

@sapphire/framework

Version:

Discord bot framework built for advanced and amazing bots.

17 lines (15 loc) 833 B
"use strict"; const require_lib_errors_Identifiers = require('../errors/Identifiers.cjs'); const require_lib_resolvers_channel = require('./channel.cjs'); let __sapphire_result = require("@sapphire/result"); let __sapphire_discord_js_utilities = require("@sapphire/discord.js-utilities"); //#region src/lib/resolvers/dmChannel.ts function resolveDMChannel(parameter, messageOrInteraction) { return require_lib_resolvers_channel.resolveChannel(parameter, messageOrInteraction).mapInto((value) => { if ((0, __sapphire_discord_js_utilities.isDMChannel)(value) && !value.partial) return __sapphire_result.Result.ok(value); return __sapphire_result.Result.err(require_lib_errors_Identifiers.Identifiers.ArgumentDMChannelError); }); } //#endregion exports.resolveDMChannel = resolveDMChannel; //# sourceMappingURL=dmChannel.cjs.map