Go to Latest
function optionParser
import { optionParser } from "https://dotland.deno.dev/x/discordeno@13.0.0-rc45/template/bigbot/src/utils/options.ts";

Parse the options to a nice object. NOTE: this does not work with subcommands

Parameters

optional
options: InteractionDataOption[]
optional
resolved: { messages?: Collection<bigint, Message>; users?: Collection<bigint, User>; members?: Collection<bigint, Member>; roles?: Collection<bigint, Role>; channels?: Collection<bigint, { id: bigint; name: string; type: ChannelTypes; permissions: bigint; }>; }
optional
translateOptions: Record<string, string>

Returns

InteractionCommandArgs | { [key: string]: InteractionCommandArgs; } | { [key: string]: { [key: string]: InteractionCommandArgs; }; }