Download the PHP package rias/craft-telegram-notification-channel without Composer
On this page you can find all versions of the php package rias/craft-telegram-notification-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rias/craft-telegram-notification-channel
More information about rias/craft-telegram-notification-channel
Files in rias/craft-telegram-notification-channel
Package craft-telegram-notification-channel
Short Description A Telegram notification channel for the Craft Notifications plugin
License MIT
Informations about the package craft-telegram-notification-channel
Telegram Notification Channel plugin for Craft Notifications
A Telegram notification channel for the Craft Notifications plugin
Support Open Source. Buy beer.
This plugin is licensed under a MIT license, which means that it's completely free open source software, and you can use it for whatever and however you wish. If you're using it and want to support the development, buy me a beer over at Beerpay!
Requirements
- Make sure you have Craft Notifications installed
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require rias/craft-telegram-notification-channel
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Telegram Notification Channel.
Setting up your Telegram Bot
Talk to @BotFather and generate a Bot API Token.
Then, configure your Telegram Bot API Token either through the plugin settings or by copying the config.php
file to config/telegram-notification-channel.php
and setting the token
there.
Using the Telegram Notification Channel
You can now add telegram
to your via()
function. You will also have to provide a toTelegram
function to create your message.
Here's a screenshot preview of the above notification on Telegram Messenger:
Available message methods
to($chatId)
: (integer) Recipient's chat id or user id.content('')
: (string) Notification message, supports markdown. For more information on supported markdown styles, check out these docs.button($text, $url)
: (string) Adds an inline "Call to Action" button. You can add as many as you want and they'll be placed 2 in a row.options([])
: (array) Allows you to add additional or override sendMessage payload (A Telegram Bot API method used to send message internally). For more information on supported parameters, check out these docs.
Credits
Brought to you by Rias