Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a button under message with telethon while logged in as user

I'm learning how to use telethon while logged in as user. Currently i have some trouble with creating inline button. My code is:

@register(outgoing=True, pattern="^\.button(?: |$)(.*)")
async def buttontest(test):
    await test.client.send_message(test.chat_id, 'click me', buttons=[Button.inline('Test', 'test-return')])

When i use this, i only see a "click me" message, without a button. Are buttons applicable while using telethon as user?

like image 320
DragonightFury Avatar asked Dec 18 '25 19:12

DragonightFury


1 Answers

You cannot send a inline buttons as a user. Try sending them via bots. Telegram limits certain type of actions usable only by bots like the inline query, buttons etc..

like image 132
WarnerStark Avatar answered Dec 20 '25 11:12

WarnerStark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!