TeleBot
Telegram Bot Framework for creating any bots
Created By Arash Abedi
Send Video To Client
# sendVideo(array $params)
You can send video to your client by calling sendVideo() method.
You can pass parameters in array to this method
see sendVideo parameters on telegram doc
# examples
# Send video to current chat (user/channel/group)
for sending video to current chat, is not necessary to pass chat_id in send message parameters. It fill automatically by Bot class
<?php
namespace App\Controllers;
use App\Modules\ExampleModule;
class MessageHandler{
public function run(){
//$params=['param_name'=>'param_value']
bot()->sendVideo(['video'=>'file_id or file_download_link']); //send video to current chat
}
}
# Send video to specific chat (user/channel/group)
for sending video to specific chat you can pass chat_id in sendVideo parameters
<?php
namespace App\Controllers;
use App\Modules\ExampleModule;
class MessageHandler{
public function run(){
//$params=['param_name'=>'param_value']
bot()->sendVideo(['chat_id'=>'785698365','video'=>'file_id or file_download_link']); //send video to specific chat by chat_id
}
}