-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Андрій Унгурян edited this page Jan 4, 2020
·
1 revision
This package will help you simplify your work with Telegram Api.
Installation takes place in the console using the command:
composer require elwahab/telegram
It may be noted that you must have a composer.
After installing the package, you just need to connect the packages as follows
<?php
use ELWAHAB\Telegram;
$telegram = new Telegram(BOT_TOKEN);
$telegram->sendMessage(CHAT_ID, 'Message');
Method for send message to your peer. This method get paraments:
- chat_id integer | id user what get message;
- text _string | message to chat_id_;
-
markdown option string | Send message with
markdown
orhtml
(Default null, but if you want use markdown, you should inputmarkdown
orhtml
).
You get result from this method: result json from Telegram API
Method for forwardMessage from one chat to other chat. Params: chat_id integer | id chat where you want send message
- from_chat_id integer | id chat where you get message to send
- message_id integer | id message what you want send
You get result from this method: result json from Telegram API
Method for delete message from chat. Params: