Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SlashCommandContext

Implements

  • Omit<CommandContext, "reply" | "send" | "sendFile" | "embed" | "args">

Index

Constructors

constructor

Properties

args

args: (string | number | boolean)[]

Command arguments

command

Command options object

interaction

interaction: Interaction

Message which command was ran with

isInteraction

isInteraction: boolean = true

Whether or not a command is an interaction or not

options

options: InteractionOptions = {}

Interaction options if ran as a slash command

prefix

prefix: string

Prefix command was ran with

ran

ran: string

Actual command that was ran (including possible aliases)

worker

worker: Worker

Worker

Accessors

author

  • get author(): APIUser

channel

  • get channel(): undefined | APIChannel

embed

  • get embed(): Embed<null>

guild

me

  • get me(): APIGuildMember

member

  • get member(): APIInteractionGuildMember

message

  • get message(): APIMessage

Methods

delete

  • delete(): Promise<never>

dm

error

  • error(message: string | Promise<string>): Promise<void>
  • Runs an error through sendback of commands.error

    Parameters

    • message: string | Promise<string>

      Message of error

    Returns Promise<void>

hasPerms

  • hasPerms(perms: "createInvites" | "kick" | "ban" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "auditLog" | "prioritySpeaker" | "stream" | "viewChannel" | "sendMessages" | "tts" | "manageMessages" | "embed" | "files" | "readHistory" | "mentionEveryone" | "externalEmojis" | "viewInsights" | "connect" | "speak" | "mute" | "deafen" | "move" | "useVoiceActivity" | "nickname" | "manageNicknames" | "manageRoles" | "webhooks" | "emojis" | "useSlashCommands" | "useApplicationCommands" | "requestToSpeak" | "manageThreads" | "usePublicThreads" | "usePrivateThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads"): boolean
  • Whether or not the running user has a certain permission

    Parameters

    • perms: "createInvites" | "kick" | "ban" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "auditLog" | "prioritySpeaker" | "stream" | "viewChannel" | "sendMessages" | "tts" | "manageMessages" | "embed" | "files" | "readHistory" | "mentionEveryone" | "externalEmojis" | "viewInsights" | "connect" | "speak" | "mute" | "deafen" | "move" | "useVoiceActivity" | "nickname" | "manageNicknames" | "manageRoles" | "webhooks" | "emojis" | "useSlashCommands" | "useApplicationCommands" | "requestToSpeak" | "manageThreads" | "usePublicThreads" | "usePrivateThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads"

      Permission to test

    Returns boolean

myPerms

  • myPerms(perms: "createInvites" | "kick" | "ban" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "auditLog" | "prioritySpeaker" | "stream" | "viewChannel" | "sendMessages" | "tts" | "manageMessages" | "embed" | "files" | "readHistory" | "mentionEveryone" | "externalEmojis" | "viewInsights" | "connect" | "speak" | "mute" | "deafen" | "move" | "useVoiceActivity" | "nickname" | "manageNicknames" | "manageRoles" | "webhooks" | "emojis" | "useSlashCommands" | "useApplicationCommands" | "requestToSpeak" | "manageThreads" | "usePublicThreads" | "usePrivateThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads"): boolean
  • Whether or not the bot user has a certain permission

    Parameters

    • perms: "createInvites" | "kick" | "ban" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "auditLog" | "prioritySpeaker" | "stream" | "viewChannel" | "sendMessages" | "tts" | "manageMessages" | "embed" | "files" | "readHistory" | "mentionEveryone" | "externalEmojis" | "viewInsights" | "connect" | "speak" | "mute" | "deafen" | "move" | "useVoiceActivity" | "nickname" | "manageNicknames" | "manageRoles" | "webhooks" | "emojis" | "useSlashCommands" | "useApplicationCommands" | "requestToSpeak" | "manageThreads" | "usePublicThreads" | "usePrivateThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads"

      Permission to test

    Returns boolean

react

  • react(): Promise<never>

reply

  • reply(data: MessageTypes, mention?: boolean, ephemeral?: boolean): Promise<null>

send

  • send(data: MessageTypes, ephemeral?: boolean): Promise<null>

sendFile

  • sendFile(file: { buffer: Buffer; name: string }, extra?: MessageTypes): Promise<null>

typing

  • typing(): Promise<null>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc