Telegram
The TelegramIntegration
class facilitates sending messages to a Telegram chat room by providing methods to set the bot token and chat room ID, and to send messages. The set_token()
method sets the bot token for Telegram API authentication, while set_room_id()
sets the chat room ID. The send_message()
method sends a message to the configured chat room using the Telegram API, returning the response object.
Usage
Below you can check examples of usage for this class.
# Set your Telegram bot token
telegram.set_token("YOUR_BOT_TOKEN")
# Set the chat room ID where you want to send messages
telegram.set_room_id(YOUR_CHAT_ROOM_ID)
# Send a message to the chat room
response = telegram.send_message("Hello from TelegramIntegration!")
Â
Easy for Jira - Python Automations, 2023