spherepack / bot-creator
You can easily create your own bot and work with it
Installs: 441
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/spherepack/bot-creator
Requires
- php: ^7.4 || ^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);