Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 44 | All time: 10,819 This week: 129 |
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. |
<?php |
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 (11) |
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 (11) | / | 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 (11) | / | src |
File | Role | Description |
---|---|---|
Commands.php | Class | Class source |
Updates.php | Class | Class source |
UpdatesTrait.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
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.