phptelebot icon indicating copy to clipboard operation
phptelebot copied to clipboard

plugin or module?

Open ranrinc opened this issue 7 years ago • 1 comments

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.

ranrinc avatar Aug 21 '17 15:08 ranrinc

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.

GrayHoax avatar Sep 21 '17 14:09 GrayHoax