mrkriskrisu/telegram

There is no license information available for the latest version (v1.0) of this package.

Very simple telegram function. Very simple.

v1.0 2021-11-22 13:36 UTC

This package is auto-updated.

Last update: 2024-04-22 19:16:59 UTC


README

Veeeeery simple telegram function, so that I don't have to use these huge Telegram libraries in my projects and have the function centrally.

Installation

composer require mrkriskrisu/telegram

Usage

Send token on function call

require_once './vendor/autoload.php';

\K118\Telegram::sendMessage(
    chatId: 123456789,
    text:   'Hello World!',
    disableNotification: true,
    token:  '...',
);

Set token before usage

require_once './vendor/autoload.php';

\K118\Telegram::setToken('...');
\K118\Telegram::sendMessage(
    chatId: 123456789,
    text:   'Hello World!',
);