

Following is the details of a telegram_connection: name: 'telegram-connection-name' conn_type: 'http' password: 'TELEGRAM_TOKEN' host: 'chat_id' (optional) Examples. chat_id can also be provided in the connection using 'host' field in connection.

If both supplied, token parameter will be given precedence, otherwise 'password' field in the connection from telegram_conn_id will be used. The library can be found here: It accepts both telegram bot API token directly or connection that has telegram bot API token. Class TelegramHook ( BaseHook ): """ This hook allows you to post messages to Telegram using the telegram python-telegram-bot library.

id, text: "Please wait, doing my job.", disable_web_page_preview: true ) status. status ( tid, tweet_mode: 'extended' ) bot. path, 'video/mp4' )) end def initialize ( client ) Telegram :: Bot :: Client. path, 'image/gif' )) end def process_video ( media, bot, message ) url = media &. path, 'image/jpeg' )) end def process_animated_gif ( media, bot, message ) url = media &. id, text: text ) end def process_photo ( media, bot, message ) url = media. split ( '/' ) rescue nil end def send_bot_error ( bot, message, text = "Invalid link, please provide valid direct Tweet URL" ) bot. download ( url ) end def get_tweet_id ( tweet_url ) tweet_url &. Require 'telegram/bot' require 'down' class Bot TOKEN = ENV MEDIA_TYPES = %(photo animated_gif video) def save_to_tempfile ( url ) :: Down.
