nutgram/nutgram

View on GitHub
examples/echobot.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

use SergiX44\Nutgram\Nutgram;

require 'vendor/autoload.php';

$bot = new Nutgram($_ENV['TOKEN']);

$bot->onText('.*', function (Nutgram $bot) {
    $text = $bot->message()->text;
    $bot->sendMessage($text);
});

$bot->run();