UNPKG

detritus-client

Version:

A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.

85 lines (84 loc) 4.72 kB
import { RequestTypes } from 'detritus-client-rest'; import { Timers } from 'detritus-utils'; import { ShardClient } from '../client'; import { ClusterClient } from '../clusterclient'; import { ClusterProcessChild } from '../cluster/processchild'; import { InteractionCommandClient } from '../interactioncommandclient'; import { Interaction, InteractionDataApplicationCommand, InteractionEditOrRespond } from '../structures'; import { InteractionCommand, InteractionCommandOption } from './command'; /** * Interaction Command Context * @category Command */ export declare class InteractionContext { readonly client: ShardClient; readonly command: InteractionCommand; readonly interaction: Interaction; readonly invoker: InteractionCommand | InteractionCommandOption; readonly loadingTimeout?: Timers.Timeout; readonly interactionCommandClient: InteractionCommandClient; metadata?: Record<string, any>; constructor(interactionCommandClient: InteractionCommandClient, interaction: Interaction, command: InteractionCommand, invoker: InteractionCommand | InteractionCommandOption); get application(): import("../structures").Oauth2Application | null; get applicationId(): string; get cluster(): ClusterClient | null; get commandClient(): import("..").CommandClient | null; get gateway(): import("detritus-client-socket/lib/gateway").Socket; get manager(): ClusterProcessChild | null; get owners(): import("detritus-utils").BaseCollection<string, import("../structures").User>; get rest(): import("../rest").RestClient; get shardCount(): number; get shardId(): number; get applications(): import("../collections").Applications; get channels(): import("../collections").Channels; get emojis(): import("../collections").Emojis; get guilds(): import("../collections").Guilds; get interactions(): import("../collections").Interactions; get members(): import("../collections").Members; get messages(): import("../collections").Messages; get notes(): import("../collections").Notes; get presences(): import("../collections").Presences; get relationships(): import("../collections").Relationships; get roles(): import("../collections").Roles; get sessions(): import("../collections").Sessions; get stageInstances(): import("../collections").StageInstances; get stickers(): import("../collections").Stickers; get typings(): import("../collections").TypingCollection; get users(): import("../collections").Users; get voiceCalls(): import("../collections").VoiceCalls; get voiceConnections(): import("../collections").VoiceConnections; get voiceStates(): import("../collections").VoiceStates; get data(): InteractionDataApplicationCommand; get channel(): import("../structures").Channel | null; get channelId(): string | undefined; get guild(): import("../structures").Guild | null; get guildId(): string | undefined; get id(): string; get inDm(): boolean; get interactionId(): string; get me(): import("../structures").Member | null; get member(): import("../structures").Member | undefined; get name(): string; get responded(): boolean; get response(): import("../structures").Message | null; get responseDeleted(): boolean | undefined; get responseId(): string | undefined; get token(): string; get user(): import("../structures").User; get userId(): string; get voiceChannel(): import("../structures").ChannelGuildVoice | null; get voiceConnection(): import("../media/voiceconnection").VoiceConnection | undefined; get voiceState(): import("../structures").VoiceState | null; createMessage(options?: RequestTypes.ExecuteWebhook | string): Promise<import("../structures").Message | null>; createResponse(options: RequestTypes.CreateInteractionResponse | number, data?: RequestTypes.CreateInteractionResponseInnerPayload | string): Promise<any>; deleteMessage(messageId: string): Promise<any>; deleteResponse(): Promise<any>; editMessage(messageId: string, options?: RequestTypes.EditWebhookTokenMessage): Promise<import("../structures").Message>; editResponse(options?: RequestTypes.EditWebhookTokenMessage): Promise<import("../structures").Message>; editOrRespond(options?: InteractionEditOrRespond | string): Promise<any>; fetchMessage(messageId: string): Promise<import("../structures").Message>; fetchResponse(): Promise<import("../structures").Message>; respond(options: RequestTypes.CreateInteractionResponse | number, data?: RequestTypes.CreateInteractionResponseInnerPayload | string): Promise<any>; toJSON(): object; toString(): string; }