PHP Class Longman\TelegramBot\Commands\AdminCommands\SendtochannelCommand

Inheritance: extends Longman\TelegramBot\Commands\AdminCommand
Afficher le fichier Open project: akalongman/php-telegram-bot

Protected Properties

Свойство Type Description
$conversation Longman\TelegramBot\Conversation Conversation Object
$description string
$name string
$need_mysql boolean
$usage string
$version string

Méthodes publiques

Méthode Description
execute ( ) : ServerResponse | mixed Command execute method
executeNoDb ( ) : mixed Execute without db

Méthodes protégées

Méthode 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 méthode

Command execute method
public execute ( ) : ServerResponse | mixed
Résultat Longman\TelegramBot\Entities\ServerResponse | mixed

executeNoDb() public méthode

Execute without db
public executeNoDb ( ) : mixed
Résultat mixed

publish() protected méthode

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
Résultat string

sendBack() protected méthode

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
Résultat Longman\TelegramBot\Entities\ServerResponse

Property Details

$conversation protected_oe property

Conversation Object
protected Conversation,Longman\TelegramBot $conversation
Résultat Longman\TelegramBot\Conversation

$description protected_oe property

protected string $description
Résultat string

$name protected_oe property

protected string $name
Résultat string

$need_mysql protected_oe property

protected bool $need_mysql
Résultat boolean

$usage protected_oe property

protected string $usage
Résultat string

$version protected_oe property

protected string $version
Résultat string