PigeonYuze / YamlBot

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

对 TOML 语法调用的支持 #35

Open PigeonYuze opened 1 year ago

PigeonYuze commented 1 year ago

使指令注册配置文件支持 TOML 或者其他的配置语言

不再像 yaml 一样过于复杂

同时使一个 TOML 配置文件内可包含一个及以上的Command声明

示例样式

(声明一个NormalCommand)

[CommandExample]
name = ["Example"]
answeringMethod = 'QUOTE'
answeringContent = """
line 1: Hello
line 2: World
Results:
0: %call-randomResult0%
1: %call-randomResult1%
"""
condition = []

[[CommandExample.run]]
name = "randomResult0"
use = 'BASE'
call = 'random'
args = []

[[CommandExample.run]]
name = "randomResult1"
use = 'BASE'
call = 'random'
args = [100,200]