如果我用一个按钮创建了一个内联键盘标记,是否可以通过按下该按钮来显示另一个内联键盘?


import telebot
import config
import random
from telebot import types
bot = telebot.TeleBot(config.TOKEN)
@bot.message_handler(commands=['start'])
def welcome(message):
img = open('static/welcome.gif', 'rb')
bot.send_video(message.chat.id, img)
# keyboard
markup = types.InlineKeyboardMarkup(row_width=2)
item1 =types.InlineKeyboardButton("", callback_data='TEST1')
item2 =types.InlineKeyboardButton("", callback_data='TEST10')
item3 =types.InlineKeyboardButton("", callback_data='TEST10')
item4 =types.InlineKeyboardButton("",'')
item5 =types.InlineKeyboardButton("👥קהילה ראשית👥", '')
item6 =types.InlineKeyboardButton("", callback_data='TEST4')
item7 =types.InlineKeyboardButton("", callback_data='TEST5')
item8 =types.InlineKeyboardButton("📚ביקורות📚", callback_data='TEST6')
item9 =types.InlineKeyboardButton("♻️שיתוף♻️", callback_data='TEST7')
item10 =types.InlineKeyboardButton("👤בדיקת סוחר👤", callback_data='TEST8')
item11 =types.InlineKeyboardButton("❓מי אנחנו❓", callback_data='TEST9')
markup.add(item1, item2 ,item3 ,item4 ,item5 ,item6 ,item7 ,item8 ,item9 ,item10 ,item11)

bot.send_message(message.chat.id, "שלום🤚, {0.first_name}!nטלקוקאין נוסדה בשנת 2020 , על ידי צוות מתכנתים מהשורה הראשונה 🛠 🔐בדגש על אבטחת הנתונים ❗️.nאנחנו כאן בשביל להנגיש סמים בכל הארץ.nאוהבים 💎TeleCocaine💎 רכישה מהנה.".format(message.from_user, bot.get_me()),
parse_mode='html', reply_markup=markup)


@bot.callback_query_handler(func=lambda call: True)
def callback_inline(call):
try:
if call.message:
if call.data == 'TEST9':
bot.send_message(call.message.chat.id, 'אז בקצרה...Telecocaine ישראל מתעסק בתיווך🔀nבין סוחרים ללקוחות אנחנו דואגים ללקוחותnסוחרים ברמה הגבוה ביותר שרק אפשר לדמייןnשירות לקוחות ומענה אנושי 24/7☎️nעזרה לכול נושא או בעיה יש למענכם צוותn👨🏻‍💻מנהלים אדיב אמין ומסורnושירותי בוטים מאובטחים 🔐')



except Exception as e:
print(repr(e))
# RUN
bot.polling(none_stop=True)

如果您只想更改内联键盘,请使用editMessageReplyMarkup方法。如果您还想更改文本,editMessageText方法将帮助您同时更改。

...
new_markup = types.InlineKeyboardMarkup(row_width=2)
new_markup.add(types.InlineKeyboardButton('New button', callback_data='new_one'))
# Changing only inline keyboard
bot.edit_message_reply_markup(
chat_id=call.message.chat.id,
message_id=call.message.message_id,
reply_markup=new_markup
)
new_text = 'New text'
# Changing the message
bot.edit_message_text(
text=new_text,
chat_id=call.message.chat.id,
message_id=call.message.message_id,
reply_markup=new_markup
)
...