레퍼런스
classes
ApplicationCommandExtension

@pikokr/command.ts / Exports / ApplicationCommandExtension

Class: ApplicationCommandExtension

Hierarchy

  • CTSExtension

    ApplicationCommandExtension

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ApplicationCommandExtension(config): ApplicationCommandExtension

Parameters

NameType
configApplicationCommandExtensionConfig

Returns

ApplicationCommandExtension

Overrides

CTSExtension.constructor

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:37 (opens in a new tab)

Properties

_logger

Protected Optional _logger: Logger<unknown>

Inherited from

CTSExtension._logger

Defined in

src/core/extensions/Extension.ts:17 (opens in a new tab)


config

config: ApplicationCommandExtensionConfig

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:37 (opens in a new tab)


unmanagedCommands

unmanagedCommands: { defaultMemberPermissions?: null | PermissionResolvable ; dmPermission?: boolean ; guilds?: string[] ; name: string ; nameLocalizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", null | string>> ; nsfw?: boolean ; type?: ChatInput | User | Message }[] = []

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:41 (opens in a new tab)

Accessors

client

get client(): Client<boolean>

Returns

Client<boolean>

Inherited from

CTSExtension.client

Defined in

src/core/extensions/Extension.ts:13 (opens in a new tab)


commandClient

get commandClient(): CommandClient

Returns

CommandClient

Inherited from

CTSExtension.commandClient

Defined in

src/core/extensions/Extension.ts:9 (opens in a new tab)


logger

get logger(): Logger<unknown>

Returns

Logger<unknown>

Inherited from

CTSExtension.logger

Defined in

src/core/extensions/CTSExtension.ts:5 (opens in a new tab)

Methods

chatInteraction

chatInteraction(i): Promise<ChatInputCommandInteraction<CacheType>>

Parameters

NameType
iChatInputCommandInteraction<CacheType>

Returns

Promise<ChatInputCommandInteraction<CacheType>>

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:346 (opens in a new tab)


commandInteraction

commandInteraction(i): Promise<UserContextMenuCommandInteraction<CacheType>>

Parameters

NameType
iUserContextMenuCommandInteraction<CacheType>

Returns

Promise<UserContextMenuCommandInteraction<CacheType>>

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:373 (opens in a new tab)


convertArguments

convertArguments(component, argList, args, getConverterArgs): Promise<void>

Parameters

NameType
componentunknown
argListunknown[]
argsCollection<number, ComponentArgument>
getConverterArgs(arg: ComponentArgument, index: number, converter: ConverterComponent<unknown>) => unknown[] | Promise<unknown[]>

Returns

Promise<void>

Inherited from

CTSExtension.convertArguments

Defined in

src/core/extensions/Extension.ts:24 (opens in a new tab)


interactionCreate

interactionCreate(i): Promise<void>

Parameters

NameType
iInteraction

Returns

Promise<void>

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:49 (opens in a new tab)


messageInteraction

messageInteraction(i): Promise<MessageContextMenuCommandInteraction<CacheType>>

Parameters

NameType
iMessageContextMenuCommandInteraction<CacheType>

Returns

Promise<MessageContextMenuCommandInteraction<CacheType>>

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:355 (opens in a new tab)


registerUnmanagedCommand

registerUnmanagedCommand(command): void

Parameters

NameType
commandObject
command.defaultMemberPermissions?null | PermissionResolvable
command.dmPermission?boolean
command.guilds?string[]
command.namestring
command.nameLocalizations?Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", null | string>>
command.nsfw?boolean
command.type?ChatInput | User | Message

Returns

void

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:44 (opens in a new tab)


sync

sync(): Promise<void>

Returns

Promise<void>

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:143 (opens in a new tab)


userInteraction

userInteraction(i): Promise<UserContextMenuCommandInteraction<CacheType>>

Parameters

NameType
iUserContextMenuCommandInteraction<CacheType>

Returns

Promise<UserContextMenuCommandInteraction<CacheType>>

Defined in

src/applicationCommand/ApplicationCommandExtension.ts:364 (opens in a new tab)