mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
🐛 修复事件没有正确结束的bug
This commit is contained in:
@@ -91,7 +91,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, account: User):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id()))
|
||||
await matcher.finish(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id()))
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
@@ -115,7 +115,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, target: At | Me):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(message + await proc.handle_query())
|
||||
await matcher.finish(message + await proc.handle_query())
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
@@ -129,7 +129,7 @@ async def _(event: Event, matcher: Matcher, account: User):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(await proc.handle_query())
|
||||
await matcher.finish(await proc.handle_query())
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
|
||||
@@ -74,7 +74,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, account: User):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id()))
|
||||
await matcher.finish(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id()))
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
@@ -98,7 +98,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, target: At | Me):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(message + await proc.handle_query())
|
||||
await matcher.finish(message + await proc.handle_query())
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
@@ -112,7 +112,7 @@ async def _(event: Event, matcher: Matcher, account: User):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(await proc.handle_query())
|
||||
await matcher.finish(await proc.handle_query())
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
|
||||
@@ -94,6 +94,7 @@ try:
|
||||
command_args=[],
|
||||
)
|
||||
await finish_special_query(matcher, proc)
|
||||
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -108,6 +109,7 @@ try:
|
||||
command_args=[],
|
||||
)
|
||||
await finish_special_query(matcher, proc)
|
||||
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -122,6 +124,7 @@ try:
|
||||
command_args=[],
|
||||
)
|
||||
await finish_special_query(matcher, proc)
|
||||
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -134,7 +137,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, account: User):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id()))
|
||||
await matcher.finish(await proc.handle_bind(platform=get_platform(bot), account=event.get_user_id()))
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
@@ -158,7 +161,7 @@ async def _(bot: Bot, event: Event, matcher: Matcher, target: At | Me):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(message + await proc.handle_query())
|
||||
await matcher.finish(message + await proc.handle_query())
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
@@ -172,7 +175,7 @@ async def _(event: Event, matcher: Matcher, account: User):
|
||||
command_args=[],
|
||||
)
|
||||
try:
|
||||
await matcher.send(await proc.handle_query())
|
||||
await matcher.finish(await proc.handle_query())
|
||||
except NeedCatchError as e:
|
||||
await matcher.send(str(e))
|
||||
raise HandleNotFinishedError from e
|
||||
|
||||
Reference in New Issue
Block a user