phptelebot
phptelebot copied to clipboard
plugin or module?
Hi There,
wondering if there a possibility to have your library used and structure my script as index.php -> a list of command for the bot help.php -> /help command for the bot start.php -> /start command for the bot
Is there a sample on how is the best way to do it? I like your library btw.
Yes it is possible. For example: start.php - $bot->on('/start', function () {/* SOMETHING TO DO /}); help.php - $bot->on('/help', function () {/ SOMETHING TO DO */});
In both files you should include 'main file'. And in main file put code, wich creating object $bot with all parameters.