Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AppCommand

Class of functional command. you need to initialize code, trigger, help, func for proper usage. Please return ResultTypes.HELP if you need to show the help message. AppCommand.exec will handle this.

export
param

功能代号

param

触发功能可用的字符串

param

功能提示/帮助文字

param

功能简介,用于生成菜单

param

负责执行功能

param
template

Hierarchy

  • AppCommand

Implements

  • BaseCommand

Index

Constructors

constructor

Properties

acceptMessageType

acceptMessageType: (typeof TextMessage | typeof ButtonEventMessage)[] = ...

接受的消息类型,默认为Button和Text,如有需要可以更改

memberof

AppCommand

client

client: undefined | KBotify

code

code: string = 'code'

func

help

help: string = 'help'

帮助文字,发送.命令 帮助时自动回复,kmarkdown消息

intro

intro: string = 'intro'

命令介绍,自动生成菜单时调用

parent

parent: null | MenuCommand = null

response

response: "guild" | "private" | "both" = 'guild'

命令响应:仅响应频道,仅响应私聊,全部响应

Abstract trigger

trigger: string

Readonly type

type: APP = ...

Accessors

_botInstance

  • get _botInstance(): undefined | KBotify

Methods

checkInput

createSession

exec

init

Private run

Generated using TypeDoc