I already know how to setup the custom keybord layout but so far I haven't found a way to show different "text" on the buttons than what is send if you push it. E.g.:
kb = [
[telegram.KeyboardButton(text='/new')],
[telegram.KeyboardButton(text='Edit')],
]
kb_markup = telegram.ReplyKeyboardMarkup(kb)`
It returns the text given and there doesnt seem to be an option to specify what should be returned/shown on screen upon clicking. Upon starting conversation with a bot it says "Start" but sends /start, is there a way to achieve this?
For KeyboardButton it is always returning the button text as messages sent from the user, if you want the data sent back to the bot not being shown/different from the button text, try using InlineKeyboardButton
And as for the /start button, it is on telegram's side, we cannot change that.
Related
I want add the buttons in rasa chat bot for integrating with telegram but whenevr i add this buttion they are comming in one line only I want to it in for each line only one button and it should take the width of title of button. Also how to pass only button as parameter in utter_message function in rasa This is code for buttons and
This is output in telegram window where buttons title is not visible completly and also all they are in one line
I tried to change the parametres of utter_message function but its not working
It seems there is a typo in your code. You have set "button_type":"verticle" while it should be "button_type":"vertical". Try changing that and see if it works.
I was wondering how to open URL by pressing inlinekeyboard button with my telegram bot using python.
Based on documentation this is supposed to work
button = types.ReplyKeyboardMarkup(one_time_keyboard=False, resize_keyboard=True) button.row( telebot.types.InlineKeyboardButton(text='Binance', url="my url") )
but it is not and I can't figure out why?
any kind of help is appreciated
You're trying to build a ReplyKeyboardMarkup but add an InlineKeyboardButton instead of a ReplyKeyboardButton, which is not supported. ReplyKeyboardMarkups are just shortcuts for sending predefined text messages and don't support opening URLs. See https://core.telegram.org/bots#keyboards.
I am trying to code a program for somebody, that is possible to send and delete messages at the same time in the browser Discord application.(I think he wants to use this to spam?) He told me to write the code in Python, so I used python with Selenium. At this point I got everything working so far, the login works, the channel select works if you just insert the channel link directly. It also managed to let it send some messages. But problem now is, that I don't know how to delete the message after it was send, beacuse you need to click a "More" button first. But this more Button
I would use Webbot for that:
from webbot import Browser
web = Browser()
web.click('More')
that module has quite a few useful simple functions so i encourage you to try it
When i use html formatting in a post and i create a link, Telegram show a popup before open the link. There is a script or something that force closure of the popup and open the link immediatly?
I don't want insert the link without HTML.
I press the enter key down(which I duplicated/remapped to the CapsLock key with Autohotkey) before I click a link. It worked easy & fortunate that there are no weird things will be triggered in the whole process.
There are no ways to close this popup. Telegram shows this for security reasons.
If you send the full URL, Telegram won't show this message.
I am new to Odoo 8 and I work on a module, I create a view with a button to send an appeal and I want that when I click the button it prints me a PDF or use it opens a box sends message I want to know what is the easiest solution and if possible send me some examples that I can use the two solutions ..
Thank you again to you