update genshin

This commit is contained in:
hibiki
2021-06-21 09:53:33 +08:00
parent 647ead8b6d
commit 862776b011
403 changed files with 138 additions and 239 deletions
+11 -2
View File
@@ -8,6 +8,7 @@ from util.utils import get_message_text
from nonebot.adapters.cqhttp.permission import PRIVATE
from util.utils import UserExistLimiter
from asyncio.exceptions import TimeoutError
from aiohttp.client_exceptions import ServerDisconnectedError
__plugin_name__ = '磁力搜索'
__plugin_usage__ = r"""
@@ -67,9 +68,17 @@ async def _(bot: Bot, event: PrivateMessageEvent, state: T_State):
f'种子:{link}')
send_flag = True
except TimeoutError:
pass
_ulmt.set_False(event.user_id)
await bt.finish(f'搜索 {keyword} 超时...')
except ServerDisconnectedError:
_ulmt.set_False(event.user_id)
await bt.finish(f'搜索 {keyword} 连接失败')
except Exception as e:
_ulmt.set_False(event.user_id)
await bt.finish(f'bt 其他未知错误..')
logger.error(f'bt 错误 e:{e}')
if not send_flag:
await bt.send(f'{keyword} 超时或未搜索到...')
await bt.send(f'{keyword} 未搜索到...')
logger.info(f'USER {event.user_id} BT搜索 {keyword} 第 {page} 页')
_ulmt.set_False(event.user_id)