PigeonYuze / YamlBot

基于mirai的0基础QQ机器人编写插件
GNU Affero General Public License v3.0
13 stars 2 forks source link

新增监听事件功能? #16

Closed PigeonYuze closed 1 year ago

PigeonYuze commented 1 year ago

描述:

使用YamlBot用以监听事件

例如:

并同时符合使用对应的生命周期 (默认使用KotlinPlugin)

Command新增对事件的管理操作,如:

同时每次在执行run时,提供对应的参数

预想:

新建一个配置文件GlobalEventListener.yml

内容如下

listener:
 - type: "Name"
   object_bot_id: 0 # default
   filter: "%what% == %mustBe% && true || false" # default: false
   callCommand: "commandName" # default null
   $provide_event_all_value: true # default true
   priority: 'NORMAL' # default NORMAL
   read_subclass: # default [all]
    - all # 读取所有的子类
   parentScope: 'USE_EITHER_JOB$Name$' # PLUGIN_JOB | NEW_JOB_FROM_PLUGIN | USE_EITHER_JOB$Name$
   run: [

   ] # like a command

Command原理相似

在监听事件时也会监听其子类事件

代办事件列表

PigeonYuze commented 1 year ago

mirai内貌似没有像关于Bot的群事件这样的实现分布,故在后续可能会合并解决

PigeonYuze commented 1 year ago

~不过貌似也没什么问题~

PigeonYuze commented 1 year ago

喜报: 实现了所有todo 但是还差yaml的读取转换

PigeonYuze commented 1 year ago

基本功能均已实现 测试完后将会合并,目前就先合并到dev内吧