from telegram import InlineKeyboardButton, InlineKeyboardMarkup
from telegram import Update
from telegram.ext import Updater, CommandHandler, CallbackContext
def hello(update: Update, context: CallbackContext) -> None:
user=update.effective_user.last_name
keyboard = [
[
InlineKeyboardButton("Option 1", callback_data='region_1'),
InlineKeyboardButton("Option 2", callback_data='region_2'),
],
[InlineKeyboardButton("Option 3", callback_data='region_3')],
[InlineKeyboardButton("Option 4", callback_data='region_4')],
]
reply_markup = InlineKeyboardMarkup(keyboard)
update.message.reply_html(f'Assalomu alekum {user}\n \nRamazon oyi muborak bolsin\n\nSizga qaysi mintaqadasiz',reply_markup=reply_markup)
updater=Updater("1826667434:AAFn_n7ra74eadxi2JlD2AbQ5dAcbX_pbcQ", use_context=True)
updater.dispatcher.add_handler(CommandHandler('start', hello))
updater.start_polling()
updater.idle()
Do'stlaringiz bilan baham: |