How to Use Colored Inline Buttons with Custom Emoji in Telethon
Requirements:
Telethon (from master branch):
Bot Requirements:
Bot owner must have Telegram Premium subscription
Requirements:
Telethon (from master branch):
pip3 uninstall telethon
pip3 install git+https://github.com/LonamiWebs/Telethon.git
Bot Requirements:
Bot owner must have Telegram Premium subscription
❤5🔥1
Smart Dev
How to Use Colored Inline Buttons with Custom Emoji in Telethon Requirements: Telethon (from master branch): pip3 uninstall telethon pip3 install git+https://github.com/LonamiWebs/Telethon.git Bot Requirements: Bot owner must have Telegram Premium subscription
import random
import asyncio
from telethon import TelegramClient, events, types, functions
API_ID = 'xxxxx'
API_HASH = 'xxxxx'
TOKEN = 'xxxxxxxxxxxx'
client = TelegramClient('bot', API_ID, API_HASH).start(bot_token=TOKEN)
@client.on(events.NewMessage(pattern='/start'))
async def start(event):
text = (
"Hello! Welcome to Color Button Demo 🎨\n\n"
"🔵 Primary - Blue Button\n"
"🟢 Success - Green Button\n"
"🔴 Danger - Red Button"
)
primary_style = types.KeyboardButtonStyle(
bg_primary=True,
icon=5258096772776991776
)
success_style = types.KeyboardButtonStyle(
bg_success=True,
icon=5258503720928288433
)
danger_style = types.KeyboardButtonStyle(
bg_danger=True,
icon=5258331647358540449
)
button1 = types.KeyboardButtonCallback(
text="Primary Button",
data=b"primary_btn",
style=primary_style
)
button2 = types.KeyboardButtonCallback(
text="Success Button",
data=b"success_btn",
style=success_style
)
button3 = types.KeyboardButtonCallback(
text="Danger Button",
data=b"danger_btn",
style=danger_style
)
markup = types.ReplyInlineMarkup(rows=[
types.KeyboardButtonRow(buttons=[button1]),
types.KeyboardButtonRow(buttons=[button2]),
types.KeyboardButtonRow(buttons=[button3])
])
await client(functions.messages.SendMessageRequest(
peer=event.chat_id,
message=text,
random_id=random.getrandbits(63),
reply_markup=markup
))
@client.on(events.CallbackQuery())
async def callback(event):
messages = {
b"primary_btn": "✅ You clicked Primary (Blue) button!",
b"success_btn": "✅ You clicked Success (Green) button!",
b"danger_btn": "✅ You clicked Danger (Red) button!"
}
await event.answer(messages.get(event.data), alert=True)
print("Bot started! 🚀")
print("Note: Make sure you're using Telethon from master branch!")
client.run_until_disconnected()
❤7 6😢2
How to Use Colored Inline Buttons with Custom Emoji in aiogram
Requirements:
aiogram 3.25.0+ (Latest version):
Requirements:
aiogram 3.25.0+ (Latest version):
pip3 install --upgrade aiogram
❤6
Smart Dev
How to Use Colored Inline Buttons with Custom Emoji in aiogram Requirements: aiogram 3.25.0+ (Latest version): pip3 install --upgrade aiogram
import asyncio
from aiogram import Bot, Dispatcher
from aiogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
from aiogram.filters import Command
TOKEN = 'XXXXXXXXXXXXX'
bot = Bot(token=TOKEN)
dp = Dispatcher()
@dp.message(Command("start"))
async def send_welcome(message: Message):
keyboard = InlineKeyboardMarkup(
inline_keyboard=[
[InlineKeyboardButton(
text="Primary Button",
callback_data="primary_btn",
icon_custom_emoji_id="5258096772776991776",
style="primary"
)],
[InlineKeyboardButton(
text="Success Button",
callback_data="success_btn",
icon_custom_emoji_id="5258503720928288433",
style="success"
)],
[InlineKeyboardButton(
text="Danger Button",
callback_data="danger_btn",
icon_custom_emoji_id="5258331647358540449",
style="danger"
)]
]
)
await message.answer(
"Hello! Welcome to Color Button Demo 🎨\n\n"
"🔵 Primary - Blue Button\n"
"🟢 Success - Green Button\n"
"🔴 Danger - Red Button",
reply_markup=keyboard
)
@dp.callback_query()
async def handle_buttons(callback: CallbackQuery):
messages = {
"primary_btn": "✅ You clicked Primary (Blue) button!",
"success_btn": "✅ You clicked Success (Green) button!",
"danger_btn": "✅ You clicked Danger (Red) button!"
}
await callback.answer(messages.get(callback.data), show_alert=True)
async def main():
print("Bot started! 🚀")
await dp.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())
🔥5 4❤1 1
How to Get Custom Emoji IDs:
1. Open bot: @emoji_idbot
2. Send any emoji (from premium emoji packs)
3. Copy the emoji ID
4. Use it in your button!
1. Open bot: @emoji_idbot
2. Send any emoji (from premium emoji packs)
3. Copy the emoji ID
4. Use it in your button!
Bot Update - Perplexity Command Fixed
Fixed bug where /ppx command failed with URLs in prompts.
Before: ❌ 404 error when using URLs
After: ✅ Works perfectly with any URL
Example now working:
/ppx read this article https://9to5google.com/...
Fixed bug where /ppx command failed with URLs in prompts.
Before: ❌ 404 error when using URLs
After: ✅ Works perfectly with any URL
Example now working:
/ppx read this article https://9to5google.com/...
⚡2
Smart Dev
Bot Update - Perplexity Command Fixed Fixed bug where /ppx command failed with URLs in prompts. Before: ❌ 404 error when using URLs After: ✅ Works perfectly with any URL Example now working: /ppx read this article https://9to5google.com/...
AI-powered with cited sources, perfect for research and getting direct answers with references
🚀 NEW: AI Help Command 🤖
Tired of searching for commands? Just ASK!
Use
•
•
•
Get instant answers with examples! ⚡️
Try it now:
Tired of searching for commands? Just ASK!
Use
/help + your question:•
/help How to download Instagram videos?•
/help How to translate a image ?•
/help What downloaders are available?Get instant answers with examples! ⚡️
Try it now:
/help what can this bot do?❤3
Smart Dev
🎵 @TelecastRobot Music Bot — Now Live! Turn your Telegram voice chats into a powerful music hub 🎶 ✨ Highlights • High-quality YouTube music (Audio & Video) • Inline mode — find and play songs easily • Auto voice chat title update • 🏆 Daily & Weekly Top-5…
New Update 🎧
Music player is now faster, and the old issue where songs were not playing fully has been fixed.
New Feature:
When someone requests a song and leaves the voice chat, the bot will mention them once their song starts playing.
YouTube Music Support Added:
The bot now supports YouTube Music URLs, so songs can be requested directly using YouTube Music links.
Admin Control:
This mention feature is optional — admins can turn it off anytime from the bot settings.
Music player is now faster, and the old issue where songs were not playing fully has been fixed.
New Feature:
When someone requests a song and leaves the voice chat, the bot will mention them once their song starts playing.
YouTube Music Support Added:
The bot now supports YouTube Music URLs, so songs can be requested directly using YouTube Music links.
Admin Control:
This mention feature is optional — admins can turn it off anytime from the bot settings.
How to Use Colored Inline Buttons with Custom Emoji in kurigram [ pyrogram fork version ]
Requirements:
kurigram v2.2.19+ (Latest version):
Requirements:
kurigram v2.2.19+ (Latest version):
pip3 install --upgrade kurigram
❤1