Smart Dev
11.5K subscribers
687 photos
50 videos
7 files
266 links
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
Download Telegram
🏁 GIVEAWAY ENDED

🎁 Educative: 6 months of free access to over 70 practical courses

πŸ“ Description:Discover the best learning environment to learn and retain concepts effortlessly.

πŸ‘₯ Total Participants: 9
🎲 Selection Type: Random Selection
πŸ† Total Winners: 2

πŸ… Winners:
1. @Amr_119
2. @Anshushinde38

πŸŽ‰ Congratulations to all winners!
πŸš€ Puter.js: Build AI Apps for FREE!

Stop paying for OpenAI APIs! Puter.js gives you AI + Cloud with ZERO cost πŸ”₯

YOU Pay:
$0
No matter how many users you have!

Each User Gets FREE:
Monthly Allowance: 50,000,000 microcents ($0.50/month)

- AI Models: GPT, Claude, DeepSeek, Gemini, Grok, Mistral & more
- Cloud Storage + Database + Auth

⚑️ No API Keys Needed!

🎯 Best For:
βœ… Simple tool bots
βœ… Web apps
βœ… Telegram bots

Scale infinitely at $0 cost!

πŸ“š Docs: https://docs.puter.com/
❀5
πŸ”” Premium Network Is Back!

We’re excited to announce that Premium Network is back with a fresh start and stronger guidelines πŸ’ͺ

πŸ‘‰ Join our official channel now and stay connected for:

⦁ Safe giveaways
⦁ Useful tech tips & updates
⦁ Legit offers and promotions

πŸ”— Join here: https://t.me/PremiumNetworkPlus

Please share this with your friends and help us rebuild the community together 🀍
Please open Telegram to view this post
VIEW IN TELEGRAM
😎4
🏁 GIVEAWAY ENDED

🎁 Canva Pro

πŸ“ Description:Canva is a free-to-use online graphic design tool. Use it to create social media posts, presentations, posters, videos, logos and more.

πŸ‘₯ Total Participants: 10
⚑ Selection Type: First Come First Served
πŸ† Total Winners: 10

πŸ… Winners:
1. @Dedbrain
2. @Idkwhomi
3. @Obito_X_02
4. User 6110294479
5. @FeRaRiXuBi
6. @Davex12391
7. @Mr_anonymous_0
8. @TancantDac
9. @Xavi_Rguez
10. @Zorokun_Tamilseller

πŸŽ‰ Congratulations to all winners!
Mistral OCR good ?
❀2
OCR Upgraded to Mistral OCR Latest

Now using the best OCR model available - far superior to Gemini, GPT, and Claude.

✨ Highlights:
- Much better accuracy
- Preserves formatting
- 10 requests/day

Try: Reply /ocr to any image
❀1❀‍πŸ”₯1
and image generator fixed
3
πŸ’Έ Support the Bot

In smart util all are paid APIs like Gpt , Claude, Perplexity, Flux , Mistral OCR costs money. Help keep Smart Util running!

For Donate use : /gift or /donate command

Every contribution helps maintain free access for everyone πŸ™
Please open Telegram to view this post
VIEW IN TELEGRAM
145❀2
Sticker generator fixed
12
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
❀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()
❀76😒2
How to Use Colored Inline Buttons with Custom Emoji in aiogram

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())
πŸ”₯54❀11
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!
64
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/...
⚑2
#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?
❀4⚑2