Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands and inline requests. You control your bots using HTTPS requests to Telegram's Bot API.
-
getMe — Get the bot info
-
getUpdates — Get updates
-
sendMessage — Send a message
-
sendPhoto — Send a photo
-
sendAudio — Send an audio
-
sendDocument — Send a document
-
sendSticker — Send a sticker
-
sendVideo — Send a video
-
sendLocation — Send a location
-
sendContact — Send a contact
-
setWebhook — Set webhook
-
getWebhookInfo — Get webhook info
-
deleteWebhook — Delete webhook
- User — User object
- update — Update object
- Message — Message object
- Chat — Chat object
- PhotoSize — PhotoSize object
import telegram
bot = telegram.Bot(token='TOKEN')
bot.getMe()