Home

Awesome

RavenxTelegram

RavenxTelegram is a custom strategy for ravenx to help you send notifications through Telegram in an 4 steps.

Installation

To install this package, you need to add ravenx_telegram to your list of dependencies in mix.exs:

def deps do
  [{:ravenx_telegram, "~> 0.1.1"}]
end

And second you need to add it to the list of Ravenx strategies in the config in order for it to work:

config :ravenx, :strategies, [
  telegram: RavenxTelegram
]

This module uses Nadia, so add into your app:

# You can get your token from @BotFather bot in Telegram.
config :nadia,
  token: "YOUR_BOT_TOKEN"

Send messages via Ravenx:

# You should create public channel in Telegram and add your bot to Admin users, when get public channel name from channel settings (or set it)   
iex> Ravenx.dispatch(:telegram, %{channel_id: "@ravenx_test", text: "Test message"}