| @@ 8-22 (lines=15) @@ | ||
| 5 | use Teebot\Command\AbstractCommand; |
|
| 6 | use Teebot\Method\SendAudio; |
|
| 7 | ||
| 8 | class Audio extends AbstractCommand |
|
| 9 | { |
|
| 10 | public function run() |
|
| 11 | { |
|
| 12 | $audio = '/var/www/html/audio.mp3'; |
|
| 13 | ||
| 14 | $args = [ |
|
| 15 | 'chat_id' => $this->getChatId(), |
|
| 16 | 'audio' => $audio |
|
| 17 | ]; |
|
| 18 | ||
| 19 | $method = new SendAudio($args); |
|
| 20 | $method->trigger(); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| @@ 8-22 (lines=15) @@ | ||
| 5 | use Teebot\Command\AbstractCommand; |
|
| 6 | use Teebot\Method\SendDocument; |
|
| 7 | ||
| 8 | class Document extends AbstractCommand |
|
| 9 | { |
|
| 10 | public function run() |
|
| 11 | { |
|
| 12 | $document = '/var/www/html/document.pdf'; |
|
| 13 | ||
| 14 | $args = [ |
|
| 15 | 'chat_id' => $this->getChatId(), |
|
| 16 | 'document' => $document |
|
| 17 | ]; |
|
| 18 | ||
| 19 | $method = new SendDocument($args); |
|
| 20 | $method->trigger(); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| @@ 8-22 (lines=15) @@ | ||
| 5 | use Teebot\Command\AbstractCommand; |
|
| 6 | use Teebot\Method\SendSticker; |
|
| 7 | ||
| 8 | class Sticker extends AbstractCommand |
|
| 9 | { |
|
| 10 | public function run() |
|
| 11 | { |
|
| 12 | $sticker = '/var/www/html/sticker.webp'; |
|
| 13 | ||
| 14 | $args = [ |
|
| 15 | 'chat_id' => $this->getChatId(), |
|
| 16 | 'sticker' => $sticker |
|
| 17 | ]; |
|
| 18 | ||
| 19 | $method = new SendSticker($args); |
|
| 20 | $method->trigger(); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| @@ 8-22 (lines=15) @@ | ||
| 5 | use Teebot\Command\AbstractCommand; |
|
| 6 | use Teebot\Method\SendVideo; |
|
| 7 | ||
| 8 | class Video extends AbstractCommand |
|
| 9 | { |
|
| 10 | public function run() |
|
| 11 | { |
|
| 12 | $video = '/var/www/html/video.mp4'; |
|
| 13 | ||
| 14 | $args = [ |
|
| 15 | 'chat_id' => $this->getChatId(), |
|
| 16 | 'video' => $video |
|
| 17 | ]; |
|
| 18 | ||
| 19 | $method = new SendVideo($args); |
|
| 20 | $method->trigger(); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| @@ 8-22 (lines=15) @@ | ||
| 5 | use Teebot\Command\AbstractCommand; |
|
| 6 | use Teebot\Method\SendVoice; |
|
| 7 | ||
| 8 | class Voice extends AbstractCommand |
|
| 9 | { |
|
| 10 | public function run() |
|
| 11 | { |
|
| 12 | $voice = '/var/www/html/voice.ogg'; |
|
| 13 | ||
| 14 | $args = [ |
|
| 15 | 'chat_id' => $this->getChatId(), |
|
| 16 | 'voice' => $voice |
|
| 17 | ]; |
|
| 18 | ||
| 19 | $method = new SendVoice($args); |
|
| 20 | $method->trigger(); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||