It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
ReloadWhen turned on automatically changes
the theme color on reload.
When turned on automatically changes
the theme color every 5 sec.
Inline keyboard buttons allow you to add interactive buttons to your Telegram bot. These buttons can open links, send callbacks, or trigger specific actions when clicked.
Follow the below steps to add inline keyboard buttons in Pyrogram.
1. You have to import buttons from Python.
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
2. Add a single button in one row.
reply_markup = InlineKeyboardMarkup([
[InlineKeyboardButton("Example 1", url="http://telegram.me/TechifyBots")]
])
3. Add multiple buttons in one row.
reply_markup = InlineKeyboardMarkup([
[InlineKeyboardButton("Example 1", url="http://t.me/TechifyBots"),
InlineKeyboardButton("Example 2", url="http://t.me/TechifyBots"),
InlineKeyboardButton("Example 3", url="http://t.me/TechifyBots")]
])
4. Add multiple buttons in multiple rows.
reply_markup = InlineKeyboardMarkup([
[InlineKeyboardButton("Example 1", url="http://t.me/TechifyBots"),
InlineKeyboardButton("Example 2", url="http://t.me/TechifyBots")],
[InlineKeyboardButton("Example 3", url="http://t.me/TechifyBots"),
InlineKeyboardButton("Example 4", url="http://t.me/TechifyBots")]
])
5. Add buttons in different row structures.
reply_markup = InlineKeyboardMarkup([
[InlineKeyboardButton("Example 1", url="http://t.me/TechifyBots")],
[InlineKeyboardButton("Example 2", url="http://t.me/TechifyBots"),
InlineKeyboardButton("Example 3", url="http://t.me/TechifyBots")],
[InlineKeyboardButton("Example 4", url="http://t.me/TechifyBots")]
])
Copying the post and using it without permission is strictly prohibited.