mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-12-16 13:40:53 +08:00
新增派蒙语音、自动处理加好友和加群请求
This commit is contained in:
parent
2e2f9bbf53
commit
af6d1fb256
@ -39,7 +39,7 @@ chat_lmt = FreqLimiter2(60)
|
||||
|
||||
|
||||
def create_matcher(chat_word: str, pattern: str, cooldown: int, pro: float, responses):
|
||||
hammer = on_regex(pattern, priority=16, temp=True)
|
||||
hammer = on_regex(pattern, priority=14, temp=True)
|
||||
|
||||
@hammer.handle()
|
||||
async def handler(event: GroupMessageEvent):
|
||||
@ -55,7 +55,6 @@ def create_matcher(chat_word: str, pattern: str, cooldown: int, pro: float, resp
|
||||
if '.mp3' not in response:
|
||||
await hammer.finish(response)
|
||||
else:
|
||||
print(os.path.join(res_path, response))
|
||||
await hammer.finish(MessageSegment.record(file=Path(os.path.join(res_path, response))))
|
||||
except FinishedException:
|
||||
raise
|
||||
|
Loading…
x
Reference in New Issue
Block a user