lib/utilities/telegram.rb
# Send a message via Telegram.
Send a message via Telegram.
Send a message via Telegram .
def call(text, swallow_ex: false)
      return false unless ENABLED
      with_retries(rescue_ex: EXCEPTIONS, swallow_ex: swallow_ex, delay: 1) do
        bot = Telegram::Bot::Client.new(TOKEN)
        bot.api.send_message(
          chat_id:    USER,
          parse_mode: :markdown,
          text:       text
        )
      end
    end
def call ( text , swallow_ex : false ) return false unless ENABLED with_retries ( rescue_ex : EXCEPTIONS , swallow_ex : swallow_ex , delay : 1 ) do bot = Telegram :: Bot :: Client . new ( TOKEN ) bot . api . send_message ( chat_id : USER , parse_mode : :markdown , text : text ) end end
Send a message via Telegram.
Send a message via Telegram .
text
<not_specific>
swallow_ex
<not_specific>