UNPKG

@sapphire/framework

Version:

Discord bot framework built for advanced and amazing bots.

20 lines (18 loc) 735 B
import { __name } from '../../chunk-PAWJFY3S.mjs'; import { isDMChannel } from '@sapphire/discord.js-utilities'; import { Result } from '@sapphire/result'; import { Identifiers } from '../errors/Identifiers.mjs'; import { resolveChannel } from './channel.mjs'; function resolvePartialDMChannel(parameter, message) { const result = resolveChannel(parameter, message); return result.mapInto((channel) => { if (isDMChannel(channel)) { return Result.ok(channel); } return Result.err(Identifiers.ArgumentDMChannelError); }); } __name(resolvePartialDMChannel, "resolvePartialDMChannel"); export { resolvePartialDMChannel }; //# sourceMappingURL=partialDMChannel.mjs.map //# sourceMappingURL=partialDMChannel.mjs.map