mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
Update __init__.py
This commit is contained in:
parent
e02a458337
commit
949e9ccd80
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user