0.0.7 • Published 10 months ago

@wahaha216/koishi-plugin-webhook-trigger v0.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@wahaha216/koishi-plugin-webhook-trigger

npm

处理 webhook 请求,并使用handlebars格式化

插件已扩展三个用法 if_equalsif_not_equalsif_exist

if_equals

判断某个键的值是否与指定值相等,使用示例:

接收的数据

{
  "test": "test",
  "a": "aaaaaaaa",
  "type": "add",
  "b": "bbbbbb"
}

格式化消息体

这是测试消息,{{ test }}
{{#if_equals type 'add'}}
{{a}}
{{else}}
{{b}}
{{/if_equals}}

结果

这是测试消息,test
aaaaaaaa

if_not_equals

判断某个键的值是否不等于指定值,与 if_equals 用法相同

if_exist

判断某个键是否存在于传入的数据中

{{#if_exist 'some_key'}}
...
{{/if_exist}}
0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago