🔀 Merge pull request #68

Fix: resolve reply message
This commit is contained in:
Ju4tCode 2020-11-19 21:29:02 +08:00 committed by GitHub
commit 30b839d736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,6 +116,8 @@ async def _check_reply(bot: "Bot", event: "Event"):
if str(event.reply["sender"]["user_id"]) == str(event.self_id):
event.to_me = True
del event.message[index]
if len(event.message) > index and event.message[index].type == "at":
del event.message[index]
if not event.message:
event.message.append(MessageSegment.text(""))