spherepack / bot-creator
You can easily create your own bot and work with it
1.1.2
2023-04-19 13:54 UTC
Requires
- php: ^7.2 || ^8
- ext-json: *
- guzzlehttp/guzzle: *
- irazasyed/telegram-bot-sdk: ^3.3
README
You can easily create your own bot and work with it
Installation
composer require spherepack/bot-creator
Usage
$bot = new TelegramBot(TOKEN)
Example
$bot = new TelegramBot(TG_TOKEN); if (!$bot->isAnswer()){ $bot->setUserId(TG_TEST_USER_ID); $bot->setMessage('регистрация'); } $command = new BotRouter(new TelegramCommands()); $message = $command->call($bot->getMessage(), $bot->getUserId()); $bot->setMessage($message); $bot->setKeyboard(['Регистрация']); echo json_encode($bot->send(), JSON_UNESCAPED_UNICODE);