fa
Feedback
Smart Dev

Smart Dev

رفتن به کانال در Telegram

Stay updated with our Telegram bot developments, discover new GitHub repositories, and get the best Python scripts. Join Smart Dev for smart coding solutions! This Channel Part Of @PremiumNetworkPlus

نمایش بیشتر
9 989
مشترکین
+1624 ساعت
+1997 روز
+94430 روز
آرشیو پست ها
Smart Dev
10 008
Which one is good or default
Which one is good or default

Smart Dev
10 008
Colored Inline Buttons with Custom Emoji For Telethon :
https://t.me/itsSmartDev/1366
For Aiogram :
https://t.me/itsSmartDev/1368
For Kurigram [ Pyrogram Fork ] :
https://t.me/itsSmartDev/1385

Smart Dev
10 008
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
from pyrogram.enums import ButtonStyle

API_ID = 'YOUR_API_ID'
API_HASH = 'YOUR_API_HASH'
BOT_TOKEN = 'YOUR_BOT_TOKEN'

app = Client("my_bot", api_id=API_ID, api_hash=API_HASH, bot_token=BOT_TOKEN)

@app.on_message(filters.command("start"))
async def start(client, message):
    keyboard = InlineKeyboardMarkup([
        [InlineKeyboardButton(
            text="Primary Button",
            callback_data="primary_btn",
            icon_custom_emoji_id=5258096772776991776,
            style=ButtonStyle.PRIMARY  # Dark Blue
        )],
        [InlineKeyboardButton(
            text="Success Button",
            callback_data="success_btn",
            icon_custom_emoji_id=5258503720928288433,
            style=ButtonStyle.SUCCESS  # Green
        )],
        [InlineKeyboardButton(
            text="Danger Button",
            callback_data="danger_btn",
            icon_custom_emoji_id=5258331647358540449,
            style=ButtonStyle.DANGER  # Red
        )]
    ])
    
    await message.reply(
        "Choose a button color! 🎨\n\n"
        "🔵 Primary - Dark Blue Button\n"
        "🟢 Success - Green Button\n"
        "🔴 Danger - Red Button",
        reply_markup=keyboard
    )

@app.on_callback_query()
async def handle_buttons(client, callback_query: CallbackQuery):
    messages = {
        "primary_btn": "✅ You clicked Primary (Dark Blue) button!",
        "success_btn": "✅ You clicked Success (Green) button!",
        "danger_btn": "✅ You clicked Danger (Red) button!"
    }
    
    await callback_query.answer(
        messages.get(callback_query.data),
        show_alert=True
    )

print("Bot started! 🚀")
app.run()

Smart Dev
10 008
How to Use Colored Inline Buttons with Custom Emoji in kurigram [ pyrogram fork ] Requirements: kurigram v2.2.19+ (Latest version):
pip3 install --upgrade kurigram

Smart Dev
10 008
I hope issue fixed 🫥🫥 😐😐😐

Smart Dev
10 008
ElevenLabs Scribe v2 good for asr ?

Smart Dev
10 008
still 1 bug exist 😂 Will fix it at night

Smart Dev
10 008
New Update Music player is now faster and the old bug where music was not playing fully has been fixed. New feature: When someone requests a song and leaves the voice chat, the bot will mention them that their song is now playing. This feature is optional, admins can turn it off from the bot settings.

Smart Dev
10 008
🚀 NEW: AI Help Command 🤖 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?

Smart Dev
10 008
Yt issue fixed

Smart Dev
10 008
photo content

Smart Dev
10 008
#OpenClaw #AIsecurity #infostealer OpenClaw AI agents targeted by infostealer malware for the first time OpenClaw configuration data is being exfiltrated by infostealer malware, signaling a new risk surface for AI-assisted workflows. Key highlights - Live infection detected; infostealer exfiltrated a victim’s OpenClaw config environment. - Attackers aim to harvest configuration files that unlock access to apps and services. - Critics warn future modules may decrypt/parse OpenClaw data, expanding attacker capabilities. - OpenClaw (aka Moltbot) is an open-source AI assistant used to automate personal/work tasks. Read More: OpenClaw AI agents targeted by infostealer malware for the first time

Smart Dev
10 008
#upcoming Instead checking command form menu 🫢 Now you can find any command or features you need just use /help command with
+3
#upcoming Instead checking command form menu 🫢 Now you can find any command or features you need just use /help command with a quary For Example : /help Can I translate a picture?

Smart Dev
10 008
AI-powered with cited sources, perfect for research and getting direct answers with references
AI-powered with cited sources, perfect for research and getting direct answers with references

Smart Dev
10 008
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/...

Smart Dev
10 008
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!

Smart Dev
10 008
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())

Smart Dev
10 008
How to Use Colored Inline Buttons with Custom Emoji in aiogram Requirements: aiogram 3.25.0+ (Latest version):
pip3 install --upgrade aiogram

Smart Dev
10 008
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()

Smart Dev
10 008
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