Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearPlugins ¶
func ClearPlugins()
func FetchPlugins ¶
Types ¶
type OnCommand ¶
type OnCommand struct { Command []string // 可触发事件的指令列表,与正则 Regex 互斥,优先使用此项 Regex string // 可触发指令的正则表达式,与指令表 Command 互斥 Listener plugin_msg_listener RequireAT bool // 是否要求必须@机器人才能触发指令 RequireAdmin bool // 是否要求频道主或或管理才可触发指令 AdminErrorMsg string // 当RequireAT,而触发用户的权限不足时,如此项不为空,返回此消息并短路;否则不进行短路 IsShortCircuit bool // 如果触发指令成功是否短路不运行后续指令(将根据注册顺序排序指令的短路机制,且插件中的短路是否影响主程序会根据bot的is_plugins_short_circuit_affect_main决定) // contains filtered or unexported fields }
func (*OnCommand) CheckCommand ¶
func (p *OnCommand) CheckCommand(data events.EventSendMessage, _logger logger.LoggerInterface, _api *apis.ApiBase) bool
内部检查当前消息是否符合触发条件
type Plugin ¶
type Plugin struct { IsEnable bool Preprocessors []Preprocessor OnCommand []OnCommand }
type Preprocessor ¶
type Preprocessor plugin_msg_listener
Click to show internal directories.
Click to hide internal directories.