skip to Main Content

Telegram Api Telethon

through the telethon python library I can send messages via inlinebutton if the session is authorized via bot. If I create a session via phone number I can't send messages with any type of button. Is it possible to do…

VIEW QUESTION

Is it possible to create a function to shortcut module functions? – Telegram API

@BOT.message_handler(commands=['drink']) def drink(message): try: BOT.send_message(message.chat.id, f'I added {message.text.split(" ", 2)[1]} to your daily intake for today, {fecha_excel}!') except IndexError: BOT.send_message(message.chat.id, 'IndexError') I basically want to create a function to shorten the "BOT.send_message(message.chat.id," part, since it will always be the same…

VIEW QUESTION

with the api bot telegram – Telegram API

Please help me fix this bug in my Python code. Error type: Update tool.init() got an unexpected argument of the keyword 'token' Code: # Telegram Bot API from telegram.text import Updater updater = Updater(token='my bot token', context_user=True) dispatcher = updater.dispatcher…

VIEW QUESTION
Back To Top
Search