import type { Option } from 'ts-results'; import type { CommandInteraction, CommandInteractionOptionResolver, Message, MessagePayload, MessageOptions, } from 'discord.js'; import type * as Sern from '../handler/sern'; export type Visibility = 'private' | 'public'; // Anything that can be sent in a `#send` or `#reply` export type possibleOutput = T | (MessagePayload & MessageOptions); export type Nullable = T | null; export type execute = Sern.Module['execute']; export type ParseType = { [K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never; }[keyof T]; // A Sern.Module['delegate'] will carry a Context Parameter export type Context = { message: Option; interaction: Option; }; export type Arg = ParseType<{ text: string; slash: SlashOptions }>; // TypeAlias for interaction.options export type SlashOptions = Omit;