
It is also possible to inser hyperlinks in HTML format. Send /newbot command and follow the instructions. Open Telegram app, search for BotFather and start the chat. I recommend to use Telegram web client for testing the basic concepts.
type: it specify the type of the reply, can be “ text”, “ audio”, “ image” or “response”ĭepending on the type, the reply should have a meaningful value: in case the type is equal to audio or image the value of reply must be a valid path to a file on your computer even if it is highly suggested to put these kind of media inside the folder “media”.Īs for now the extentions tested for media are “.jpg”, “.gif” and “.mp3”.Įdit October 2021: introduced type “response”, in which the bot will quote the message it is answering to. To create a Telegram bot with Python, you need to register on Telegram (obviously). reply: which is what is meant to be sent as message.
replies: concatenation of a “sub-ojects”. Follow instructions and make a new name for your bot. triggers: concatenation of strings that trigger that answer Go to the telegram app on your phone and Click on or type /newbot to create a new bot. To do this you need to use another Telegram bot, BotFather. Of course this is just an example with 3 answers, you can have a lot more. Create a Telegram bot First of all, you need to create a Telegram bot.