Update __init__.py

This commit is contained in:
SCUOP 2022-06-16 20:55:08 +08:00 committed by GitHub
parent e02a458337
commit 949e9ccd80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ def check_group(event: GroupMessageEvent) -> bool:
async def update_paimon_voice(event: MessageEvent):
try:
old_len = len([m for m in matchers[10] if m.plugin_name == 'Paimon_Chat'])
voice_list = await load_json_from_url('https://www.scuop.top/chat.json')
voice_list = await load_json_from_url('https://static.cherishmoon.fun/LittlePaimon/voice/voice_list.json')
matchers[10] = [m for m in matchers[10] if m.plugin_name != 'Paimon_Chat']
for key, value in voice_list.items():
create_matcher(key, value['pattern'], value['cooldown'], value['pro'], value['files'])
@ -85,6 +85,6 @@ def create_matcher(chat_word: str, pattern: str, cooldown: int, pro: float, resp
@driver.on_startup
async def load_voice():
voice_list = await load_json_from_url('https://www.scuop.top/chat.json')
voice_list = await load_json_from_url('https://static.cherishmoon.fun/LittlePaimon/voice/voice_list.json')
for k, v in voice_list.items():
create_matcher(k, v['pattern'], v['cooldown'], v['pro'], v['files'])