class TelegramService

Service for sending alerts via Telegram.

This service handles the dispatching of messages to Telegram chats using simple bot API, supporting proxy and verification configurations.

Properties

protected Client $client

Methods

void
__construct()

Create a new service instance.

void
sendMessage(string $chatId, string $message, string $botKey = 'default')

Send a message to a Telegram chat.

Details

at line 25
void __construct()

Create a new service instance.

Return Value

void

at line 36
void sendMessage(string $chatId, string $message, string $botKey = 'default')

Send a message to a Telegram chat.

Parameters

string $chatId

The Telegram chat ID

string $message

The message content

string $botKey

The configuration key for the bot (defaults to 'default')

Return Value

void

Exceptions

GuzzleException