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

How to use multi bots ? #15

Open
sallsabil opened this issue Sep 22, 2019 · 3 comments
Open

How to use multi bots ? #15

sallsabil opened this issue Sep 22, 2019 · 3 comments

Comments

@sallsabil
Copy link

sallsabil commented Sep 22, 2019

I'm going to use multi bots but it doesn't work.

...

$c=1;
while (true) {

 $bot = new Soroush\Client( $tokens[$c] );

 $messages = $bot->getMessages();

 foreach ($messages as $message) {

 $data = $message->getData();

...

It stops at $tokens[1] and doesn't go to the next number.
I really need this multi mode bots.
So how can I run it correctly ?

@bsimjoo
Copy link

bsimjoo commented Jul 13, 2020

:-D
$c=$c+1

@bsimjoo
Copy link

bsimjoo commented Jul 13, 2020

because c variable is 1 forever? (at least in above code!) and also you must check c be less-equal than tokens max index try this:

$c=0
while ($c<count($tokens)) {
$c=$c+1
// whatever

But notice I don't know any thing about php language. I'm a C# and python programmer.

@sallsabil
Copy link
Author

Thank you
But the solution is not like that in this framework
However I didn't look for the solution anymore

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