PHP Class Longman\TelegramBot\Commands\AdminCommands\SendtochannelCommand

Inheritance: extends Longman\TelegramBot\Commands\AdminCommand
Datei anzeigen Open project: akalongman/php-telegram-bot

Protected Properties

Property Type Description
$conversation Longman\TelegramBot\Conversation Conversation Object
$description string
$name string
$need_mysql boolean
$usage string
$version string

Public Methods

Method Description
execute ( ) : ServerResponse | mixed Command execute method
executeNoDb ( ) : mixed Execute without db

Protected Methods

Method Description
publish ( Message $message, integer $channel, string | null $caption = null ) : string Publish a message to a channel and return success or failure message
sendBack ( Message $message, array $data ) : ServerResponse SendBack

Method Details

execute() public method

Command execute method
public execute ( ) : ServerResponse | mixed
return Longman\TelegramBot\Entities\ServerResponse | mixed

executeNoDb() public method

Execute without db
public executeNoDb ( ) : mixed
return mixed

publish() protected method

Publish a message to a channel and return success or failure message
protected publish ( Message $message, integer $channel, string | null $caption = null ) : string
$message Longman\TelegramBot\Entities\Message
$channel integer
$caption string | null
return string

sendBack() protected method

Received a message, the bot can send a copy of it to another chat/channel. You don't have to care about the type of the message, the function detect it and use the proper REQUEST:: function to send it. $data include all the var that you need to send the message to the proper chat
protected sendBack ( Message $message, array $data ) : ServerResponse
$message Longman\TelegramBot\Entities\Message
$data array
return Longman\TelegramBot\Entities\ServerResponse

Property Details

$conversation protected_oe property

Conversation Object
protected Conversation,Longman\TelegramBot $conversation
return Longman\TelegramBot\Conversation

$description protected_oe property

protected string $description
return string

$name protected_oe property

protected string $name
return string

$need_mysql protected_oe property

protected bool $need_mysql
return boolean

$usage protected_oe property

protected string $usage
return string

$version protected_oe property

protected string $version
return string