Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin or module? #3

Open
ranrinc opened this issue Aug 21, 2017 · 1 comment
Open

plugin or module? #3

ranrinc opened this issue Aug 21, 2017 · 1 comment

Comments

@ranrinc
Copy link

ranrinc commented Aug 21, 2017

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.

@GrayHoax
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants