-
Notifications
You must be signed in to change notification settings - Fork 29
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
Mutiple bots #91
Comments
AFAIK you would just need to construct your own loop interface and pass it into the Zanzara object's construction via the $config parameter, and starting the loop would start all the bots associated with it. Per the construct method: public function __construct(string $botToken, ?Config $config = null)
{
$this->config = $config ?? new Config(); // You would need to create your own Config()
$this->loop = $this->config->getLoop() ?? Loop::get(); //ReactPHP loop is retrieved You would also need to define multiple Zanzara objects, one per bot. |
There's one problem: they're all using webhooks instead of long polling. It would be helpful to have an example in the doc @cheeghi |
@foremtehan, I'm not sure exactly what you're looking for. Are you saying that you have a webserver that's using NGINX, Apache, or something similar? That's the only reason I can think of where you'd only be able to be using webhooks, and ReactPHP applications cannot be run from any of those. Alternatively, you could look into implementing a React HTTP server and set up endpoints for your webhooks that all your other bots can point to and send their data that way. |
How can i use zanzara when i have many bots? because zanzara only works with single bot
The text was updated successfully, but these errors were encountered: