mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
🐛 Fix reply message can't be edited
This commit is contained in:
parent
c1ed010cb0
commit
eb3b549754
@ -7,6 +7,7 @@ from simnet import GenshinClient, Region
|
|||||||
from simnet.models.genshin.wish import BannerType
|
from simnet.models.genshin.wish import BannerType
|
||||||
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
||||||
from telegram.constants import ChatAction
|
from telegram.constants import ChatAction
|
||||||
|
from telegram.error import BadRequest
|
||||||
from telegram.ext import ConversationHandler, filters
|
from telegram.ext import ConversationHandler, filters
|
||||||
from telegram.helpers import create_deep_linked_url
|
from telegram.helpers import create_deep_linked_url
|
||||||
|
|
||||||
@ -239,7 +240,11 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
reply = await message.reply_text("小派蒙正在从服务器获取数据,请稍后", reply_markup=ReplyKeyboardRemove())
|
reply = await message.reply_text("小派蒙正在从服务器获取数据,请稍后", reply_markup=ReplyKeyboardRemove())
|
||||||
await message.reply_chat_action(ChatAction.TYPING)
|
await message.reply_chat_action(ChatAction.TYPING)
|
||||||
text = await self._refresh_user_data(user, authkey=authkey)
|
text = await self._refresh_user_data(user, authkey=authkey)
|
||||||
await reply.edit_text(text)
|
try:
|
||||||
|
await reply.delete()
|
||||||
|
except BadRequest:
|
||||||
|
pass
|
||||||
|
await message.reply_text(text)
|
||||||
return ConversationHandler.END
|
return ConversationHandler.END
|
||||||
|
|
||||||
@conversation.entry_point
|
@conversation.entry_point
|
||||||
|
Loading…
Reference in New Issue
Block a user