词条模糊匹配使用contains方法

This commit is contained in:
HibiKier
2022-08-21 18:32:24 +08:00
parent d183903917
commit 2051e8183c
3 changed files with 12 additions and 10 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ __plugin_configs__ = {
},
}
coser = on_regex(r"^(\d?)连?(cos|COS|coser|括丝)$", priority=5, block=True)
coser = on_regex(r"^(\d)?连?(cos|COS|coser|括丝)$", priority=5, block=True)
# 纯cos,较慢:https://picture.yinux.workers.dev
# 比较杂,有福利姬,较快:https://api.jrsgslb.cn/cos/url.php?return=img
@@ -44,7 +44,7 @@ url = "https://picture.yinux.workers.dev/"
@coser.handle()
async def _(bot: Bot, event: MessageEvent, reg_group: Tuple[Any, ...] = RegexGroup()):
async def _(event: MessageEvent, reg_group: Tuple[Any, ...] = RegexGroup()):
num = reg_group[0] or 1
for _ in range(int(num)):
try: