mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-31 22:57:14 +00:00
fix: 执行命令出错后无法再使用的情况
This commit is contained in:
@@ -190,6 +190,7 @@ class QQBotManager:
|
|||||||
else:
|
else:
|
||||||
processing.append("person_{}".format(event.sender.id))
|
processing.append("person_{}".format(event.sender.id))
|
||||||
|
|
||||||
|
try:
|
||||||
# 超时则重试,重试超过次数则放弃
|
# 超时则重试,重试超过次数则放弃
|
||||||
failed = 0
|
failed = 0
|
||||||
for i in range(self.retry):
|
for i in range(self.retry):
|
||||||
@@ -202,7 +203,7 @@ class QQBotManager:
|
|||||||
|
|
||||||
if failed == self.retry:
|
if failed == self.retry:
|
||||||
reply = "[bot]err:请求超时"
|
reply = "[bot]err:请求超时"
|
||||||
|
finally:
|
||||||
processing.remove("person_{}".format(event.sender.id))
|
processing.remove("person_{}".format(event.sender.id))
|
||||||
|
|
||||||
if reply != '':
|
if reply != '':
|
||||||
@@ -225,6 +226,7 @@ class QQBotManager:
|
|||||||
|
|
||||||
processing.append("group_{}".format(event.sender.id))
|
processing.append("group_{}".format(event.sender.id))
|
||||||
|
|
||||||
|
try:
|
||||||
# 超时则重试,重试超过次数则放弃
|
# 超时则重试,重试超过次数则放弃
|
||||||
failed = 0
|
failed = 0
|
||||||
for i in range(self.retry):
|
for i in range(self.retry):
|
||||||
@@ -237,7 +239,7 @@ class QQBotManager:
|
|||||||
|
|
||||||
if failed == self.retry:
|
if failed == self.retry:
|
||||||
reply = "err:请求超时"
|
reply = "err:请求超时"
|
||||||
|
finally:
|
||||||
processing.remove("group_{}".format(event.sender.id))
|
processing.remove("group_{}".format(event.sender.id))
|
||||||
|
|
||||||
if reply != '':
|
if reply != '':
|
||||||
|
|||||||
Reference in New Issue
Block a user