🐛 Fix await

This commit is contained in:
xtaodada 2022-07-25 18:19:10 +08:00
parent 64982e1f2b
commit 0ad23bcfc6
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import json
from init import request
def guess_str(key):
async def guess_str(key):
if key == '':
return ''
text = {'text': key}

View File

@ -17,8 +17,8 @@ async def guess_command(_: Client, message: Message):
else:
rep_text = ''
if reply := message.reply_to_message:
rep_text += guess_str(reply.text)
text = guess_str(message.text[7:])
rep_text += await guess_str(reply.text)
text = await guess_str(message.text[7:])
if not rep_text and not text:
await msg.edit('没有匹配到拼音首字母缩写')
elif not rep_text: