Skip to content
Advertisement

Tag: telegram

Getting callback query from telegram inline buttons

I am new to telegram inline bot. I have no clue how I can retrieve the callback function of telegram’s inlinekeyboardbuttons. Would be forever greatful if someone can explain this to me how I could retrieve user response. Answer You have to use CallbackQueryHandler to assing function to data If you use pattern .* then it will get all data

How to delete queue updates in telegram api?

I’m trying to delete messages from /getUpdates in telegram API but I didn’t know how.. I tried to use /deleteMessage But it didn’t delete message from API database.. Answer TL;DR: Call getUpdates() with the offset parameter set to the last message’s id, incremented by 1 We’ll need to let Telegram know which message’s we’ve processed. To do this, set the

When starting client the code is asking for phone/bot token

While running my first code using Telethon library, it is asking for a bot token. This is the actual code: And on command prompt: Result: Please enter your phone (or bot token) If I give my API ID, it eventually throws the error: telethon.errors.rpcerrorlist.PhoneNumberInvalidError: The phone number is invalid (caused by SendCodeRequest) Why? I expect the client to start without

Advertisement