From c18a50f538910585beeec2b3cca64eab25a22aa9 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 13 Mar 2022 22:53:04 +0800 Subject: [PATCH] xtao-some Patch edit --- list.json | 2 +- xtao-some.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/list.json b/list.json index 5e82a8b..680d50b 100644 --- a/list.json +++ b/list.json @@ -2,7 +2,7 @@ "list": [ { "name": "xtao-some", - "version": "1.0", + "version": "1.01", "section": "daily", "maintainer": "xtaodada", "size": "12.9 kb", diff --git a/xtao-some.py b/xtao-some.py index 33d8239..3521585 100644 --- a/xtao-some.py +++ b/xtao-some.py @@ -3,7 +3,7 @@ import json from pyrogram import Client from pagermaid.listener import listener -from pagermaid.utils import alias_command, Message, edit_or_reply, client +from pagermaid.utils import alias_command, Message, client @listener(is_plugin=True, outgoing=True, command=alias_command("guess"), @@ -11,8 +11,8 @@ from pagermaid.utils import alias_command, Message, edit_or_reply, client async def guess(c: Client, message: Message): text = message.arguments if not text: - return await edit_or_reply(message, "请先输入一个缩写。") - message = await edit_or_reply(message, "获取中 . . .") + return await message.edit("请先输入一个缩写。") + message = await message.edit("获取中 . . .") text = {'text': text} guess_json = (await client.post("https://lab.magiconch.com/api/nbnhhsh/guess", json=text)).json() @@ -29,6 +29,6 @@ async def guess(c: Client, message: Message): except: guess_res1_ans = "尚未录入" guess_res.extend(["词组:" + guess_res1_name + "\n释义:" + guess_res1_ans]) - await edit_or_reply(message, "\n\n".join(guess_res)) + await message.edit("\n\n".join(guess_res)) else: - await edit_or_reply(message, "没有匹配到拼音首字母缩写") + await message.edit("没有匹配到拼音首字母缩写")