@globalart/nestcord
Version:
A module for creating Discord bots using NestJS, based on Discord.js
33 lines (32 loc) • 1.09 kB
TypeScript
import { ContextMenuCommandInteraction, MessageApplicationCommandData, Snowflake, UserApplicationCommandData } from 'discord.js';
import { CommandDiscovery } from '../command.discovery';
/**
* The context menu metadata.
*/
export type ContextMenuMeta = (MessageApplicationCommandData | UserApplicationCommandData) & {
guilds?: Snowflake[];
};
/**
* The context menu discovery.
* @see CommandDiscovery
* @see ContextMenuMeta
*/
export declare class ContextMenuDiscovery extends CommandDiscovery<ContextMenuMeta> {
/**
* Gets the discovery type.
*/
getType(): import("discord.js").ApplicationCommandType.User | import("discord.js").ApplicationCommandType.Message;
/**
* Type guard for the context menu discovery.
*/
isContextMenu(): this is ContextMenuDiscovery;
/**
* Executes the context menu discovery.
* @param interaction The interaction to execute.
*/
execute(interaction: ContextMenuCommandInteraction): unknown;
/**
* Converts the context menu discovery to JSON.
*/
toJSON(): ContextMenuMeta;
}