mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-06-19 13:55:07 +08:00
🎨 返回值修改
This commit is contained in:
parent
59094025e4
commit
9f09c621c3
@ -35,6 +35,7 @@ def modify_func(func):
|
|||||||
async def wrapper(bot: Bot, event: Event):
|
async def wrapper(bot: Bot, event: Event):
|
||||||
try:
|
try:
|
||||||
result = await func(bot, event)
|
result = await func(bot, event)
|
||||||
|
return result
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error(f'[SV] {event.command} 执行时出现错误!')
|
logger.error(f'[SV] {event.command} 执行时出现错误!')
|
||||||
logger.error(traceback.format_exc())
|
logger.error(traceback.format_exc())
|
||||||
@ -47,7 +48,6 @@ def modify_func(func):
|
|||||||
if bot.session_id in mutiply_instances and bot.mutiply_tag:
|
if bot.session_id in mutiply_instances and bot.mutiply_tag:
|
||||||
mutiply_instances.pop(bot.session_id)
|
mutiply_instances.pop(bot.session_id)
|
||||||
mutiply_map.pop(bot.temp_gid)
|
mutiply_map.pop(bot.temp_gid)
|
||||||
return result
|
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user