🐛 fix ding adapter issues

1. cannot send complicate message, such as actionCard
2. fix judge current connection mode
This commit is contained in:
artin
2021-09-13 01:18:25 +08:00
parent 53a576dae5
commit 9931563d80
3 changed files with 14 additions and 4 deletions

View File

@ -505,7 +505,7 @@ class Matcher(metaclass=MatcherMeta):
"""
bot = current_bot.get()
event = current_event.get()
if message:
if message is not None:
await bot.send(event=event, message=message, **kwargs)
raise FinishedException
@ -571,6 +571,7 @@ class Matcher(metaclass=MatcherMeta):
while self.handlers:
handler = self.handlers.pop(0)
logger.debug(f"Running handler {handler}")
await handler(self, bot, event, self.state)
except RejectedException: