From 3f0331ed90394c75aaeabd1086b986776dfb279e Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Sun, 23 Oct 2022 13:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=20InlineKeyboardMarkup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/decorators/error.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/decorators/error.py b/utils/decorators/error.py index e25cfec..461267f 100644 --- a/utils/decorators/error.py +++ b/utils/decorators/error.py @@ -5,7 +5,7 @@ from typing import Callable, cast from aiohttp import ClientConnectorError from genshin import InvalidCookies, GenshinException, TooManyRequests, DataNotPublic from httpx import ConnectTimeout -from telegram import Update, ReplyKeyboardRemove, InlineKeyboardButton +from telegram import Update, ReplyKeyboardRemove, InlineKeyboardButton, InlineKeyboardMarkup from telegram.error import BadRequest, TimedOut, Forbidden from telegram.ext import CallbackContext, ConversationHandler @@ -17,7 +17,7 @@ from utils.log import logger async def send_user_notification(update: Update, context: CallbackContext, text: str): if update.inline_query is not None: # 忽略 inline_query return - buttons = [[InlineKeyboardButton("点我重新绑定", url=f"https://t.me/{context.bot.username}?start=set_cookie")]] + buttons = InlineKeyboardMarkup([[InlineKeyboardButton("点我重新绑定", url=f"https://t.me/{context.bot.username}?start=set_cookie")]]) user = update.effective_user message = update.effective_message chat = update.effective_chat