레퍼런스
modules

@pikokr/command.ts / Exports

@pikokr/command.ts

Table of contents

Classes

Type Aliases

Functions

Type Aliases

ApplicationCommandComponentOptions

Ƭ ApplicationCommandComponentOptions: UserApplicationCommandData | MessageApplicationCommandData | Omit<ChatInputApplicationCommandData, "options"> & { guilds?: Snowflake[] ; type: ApplicationCommandType }

Defined in

src/applicationCommand/ApplicationCommand.ts:6 (opens in a new tab)


ApplicationCommandExtensionConfig

Ƭ ApplicationCommandExtensionConfig: Object

Type declaration

NameType
guilds?Snowflake[]

Defined in

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


ArgumentConvertOptions

Ƭ ArgumentConvertOptions<T>: Object

Type parameters

Name
T

Type declaration

NameType
componentunknown
parameterlessboolean
typeT

Defined in

src/core/converter/index.ts:4 (opens in a new tab)


ArgumentConvertOptionsArg

Ƭ ArgumentConvertOptionsArg<T>: Omit<ArgumentConvertOptions<T>, "parameterless"> & { parameterless?: boolean }

Type parameters

Name
T

Defined in

src/core/converter/index.ts:6 (opens in a new tab)


ComponentArgumentStore

Ƭ ComponentArgumentStore: Collection<number, ComponentArgumentDecorator>

Defined in

src/core/components/decoratorCreator.ts:9 (opens in a new tab)


ComponentHookFn

Ƭ ComponentHookFn<T>: (...args: T) => void | Promise<void>

Type parameters

NameType
Textends unknown[]

Type declaration

▸ (...args): void | Promise<void>

Parameters
NameType
...argsT
Returns

void | Promise<void>

Defined in

src/core/hooks/componentHook.ts:4 (opens in a new tab)


ComponentHookStore

Ƭ ComponentHookStore: Collection<string, ComponentHookFn<unknown[]>[]>

Defined in

src/core/hooks/componentHook.ts:6 (opens in a new tab)


ComponentStore

Ƭ ComponentStore: Collection<string | symbol, BaseComponent>

Defined in

src/core/components/decoratorCreator.ts:8 (opens in a new tab)


ListenerOptions

Ƭ ListenerOptions: Object

Type declaration

NameType
emitterstring
eventstring

Defined in

src/core/listener/index.ts:5 (opens in a new tab)


ListenerOptionsArg

Ƭ ListenerOptionsArg: Object

Type declaration

NameType
emitter?string
eventstring

Defined in

src/core/listener/index.ts:7 (opens in a new tab)


ModuleHookStore

Ƭ ModuleHookStore: Collection<string, ComponentHookFn<unknown[]>[]>

Defined in

src/core/hooks/moduleHook.ts:5 (opens in a new tab)


TextCommandConfig

Ƭ TextCommandConfig: Object

Type declaration

NameType
prefixstring | string[] | (msg: Message) => Promise<string | string[]> | string | string[]

Defined in

src/textCommand/TextCommandExtension.ts:8 (opens in a new tab)


TextCommandOptions

Ƭ TextCommandOptions: Object

Type declaration

NameType
aliases?string[]
description?string
namestring

Defined in

src/textCommand/TextCommand.ts:4 (opens in a new tab)

Functions

applicationCommand

applicationCommand(options): MethodDecorator

Parameters

NameType
optionsApplicationCommandComponentOptions

Returns

MethodDecorator

Defined in

src/applicationCommand/ApplicationCommand.ts:24 (opens in a new tab)


argConverter

argConverter<T>(options): MethodDecorator

Type parameters

Name
T

Parameters

NameType
optionsArgumentConvertOptionsArg<T>

Returns

MethodDecorator

Defined in

src/core/converter/index.ts:18 (opens in a new tab)


command

command(options): MethodDecorator

Parameters

NameType
optionsTextCommandOptions

Returns

MethodDecorator

Defined in

src/textCommand/TextCommand.ts:16 (opens in a new tab)


createArgumentDecorator

createArgumentDecorator<Options>(type): (options: Options) => ParameterDecorator

Type parameters

Name
Options

Parameters

NameType
typetypeof ComponentArgumentDecorator

Returns

fn

▸ (options): ParameterDecorator

Parameters
NameType
optionsOptions
Returns

ParameterDecorator

Defined in

src/core/components/decoratorCreator.ts:61 (opens in a new tab)


createCheckDecorator

createCheckDecorator(fn): MethodDecorator

Parameters

NameType
fnComponentHookFn<[CommandClient, Interaction | Message<boolean>]>

Returns

MethodDecorator

Defined in

src/core/utils/checks.ts:8 (opens in a new tab)


createComponentDecorator

createComponentDecorator(component): MethodDecorator

Parameters

NameType
componentBaseComponent

Returns

MethodDecorator

Defined in

src/core/components/decoratorCreator.ts:29 (opens in a new tab)


createComponentHook

createComponentHook<T>(name, fn): MethodDecorator

Type parameters

NameType
Textends unknown[]

Parameters

NameType
namestring
fnComponentHookFn<T>

Returns

MethodDecorator

Defined in

src/core/hooks/componentHook.ts:19 (opens in a new tab)


getComponent

getComponent(target, key): undefined | BaseComponent

Parameters

NameType
targetobject
keystring | symbol

Returns

undefined | BaseComponent

Defined in

src/core/components/decoratorCreator.ts:23 (opens in a new tab)


getComponentArgumentStore

getComponentArgumentStore(target, key): ComponentArgumentStore

Parameters

NameType
targetobject
keystring | symbol

Returns

ComponentArgumentStore

Defined in

src/core/components/decoratorCreator.ts:49 (opens in a new tab)


getComponentStore

getComponentStore(target): ComponentStore

Parameters

NameType
targetobject

Returns

ComponentStore

Defined in

src/core/components/decoratorCreator.ts:11 (opens in a new tab)


getModuleHookStore

getModuleHookStore(target): ModuleHookStore

Parameters

NameType
targetobject

Returns

ModuleHookStore

Defined in

src/core/hooks/moduleHook.ts:7 (opens in a new tab)


listener

listener(options): MethodDecorator

Parameters

NameType
optionsListenerOptionsArg

Returns

MethodDecorator

Defined in

src/core/listener/index.ts:19 (opens in a new tab)


mergeMethodDecorators

mergeMethodDecorators(decorators): MethodDecorator

Parameters

NameType
decoratorsMethodDecorator[]

Returns

MethodDecorator

Defined in

src/core/utils/decorators.ts:1 (opens in a new tab)


moduleHook

moduleHook(name): MethodDecorator

Parameters

NameType
namestring

Returns

MethodDecorator

Defined in

src/core/hooks/moduleHook.ts:19 (opens in a new tab)


option

option(options): ParameterDecorator

Parameters

NameType
optionsApplicationCommandOptionData

Returns

ParameterDecorator

Defined in

src/core/components/decoratorCreator.ts:62 (opens in a new tab)


ownerOnly

ownerOnly<T>(target, propertyKey, descriptor): void | TypedPropertyDescriptor<T>

Type parameters

Name
T

Parameters

NameType
targetObject
propertyKeystring | symbol
descriptorTypedPropertyDescriptor<T>

Returns

void | TypedPropertyDescriptor<T>

Defined in

node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts:21


rest

rest(options): ParameterDecorator

Parameters

NameType
optionsvoid

Returns

ParameterDecorator

Defined in

src/core/components/decoratorCreator.ts:62 (opens in a new tab)