PHP code example of teapodsoft / slim-app-telegram

1. Go to this page and download the library: Download teapodsoft/slim-app-telegram library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

teapodsoft / slim-app-telegram example snippets




namespace Teapodsoft\Telegram\Commands;

final class TimeCommand extends CommandAbstract
{

    protected static function getMessage(): string
    {
        return 'Current DateTime: '. date('Y-m-d H:i:s', time());
    }

}


    // Настройки Telegram Bot клиента для запуска консольных команд
    CommandInterface::class => [
        'start' => \Teapodsoft\Telegram\Commands\StartCommand::class,
        'demo' => \Teapodsoft\Telegram\Commands\DemoCommand::class,
        'time' => \Teapodsoft\Telegram\Commands\TimeCommand::class,
        'date' => \Teapodsoft\Telegram\Commands\TimeCommand::class,
    ],