Recommend this page to a friend! |
Download .zip |
Info | Example | View files (11) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-09-03 (28 days ago) | Not yet rated by the users | Total: 34 This week: 1 | All time: 10,566 This week: 209 |
Version | License | PHP version | Categories | |||
telegram-bot-handler 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, Web services, Chat |
Description | Author | |
This package can create a Telegram bot to respond to specific events. |
composer require mateodioev/tg-handler
See examples folder for more information.
use Mateodioev\TgHandler\Commands;
$cmd = new Commands($namespace, $commandsPrefix);
Text commands
$cmd->CmdMessage($cmd, $callable, $functionParams);
Callback data
$cmd->CmdCallback($cmd, $callable, $functionParams);
Inline querys
$cmd->CmdInline($cmd, $callable, $functionParams);
Middlewares are executed before the command is executed.
_Types:_ message, photo, video, audio, voice, documment, sticker, venue, location, inline, callback, new_chat_member, left_chat_member, new_chat_title, new_chat_photo, group_chat_created, supergroup_chat_created, migrate_to_chat_id, migrate_from_chat_id, edited, game, channel, edited_channel
$cmd->on($type, $callable, $functionParams);
Run all comands registered and execute after middleware.
// Optional param
$cmd->run($afterMidleware);
Files |
File | Role | Description | ||
---|---|---|---|---|
examples (4 files) | ||||
src (3 files) | ||||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files | / | examples |
File | Role | Description |
---|---|---|
functions.php | Example | Example script |
getUpdates.php | Example | Example script |
hello.php | Example | Example script |
send_button.php | Example | Example script |
Files | / | src |
File | Role | Description |
---|---|---|
Commands.php | Class | Class source |
Updates.php | Class | Class source |
UpdatesTrait.php | Class | Class source |
telegram-bot-handler-2022-09-03.zip 10KB | |
telegram-bot-handler-2022-09-03.tar.gz 8KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.