#Both Collectors get fired when either bu...

1 messages · Page 1 of 1 (latest)

tribal adder
#

Respond here

dark surge
#

try this for me and lmk what happens

#

havnt tried it myself

#

In the updated code i passed the filter function directly as a property of the object passed to the createMessageComponentCollector() method this should ensure that each collector only responds to the corresponding button press and not both.

#

( again not 100% sure)

#

@tribal adder

tribal adder
#

Ok it got weirder. It runs just fine the first time I run the command. The bot responds appropriately.

But when I run the command second time, it crashes again.

#

@dark surge

dark surge
tribal adder
#

Yes

dark surge
#

hmm okay wait

tribal adder
#

Ok I fixed it.

dark surge
#

tribal adder
#

Problem was that the previous collector was still running and on the second message, both collectors would conflict.

#

The instances of each collector were the problem.

#

I set max: 1 so collector is destroyed

dark surge
#

you could call their **stop() **method when the command is done

dark surge
tribal adder
#

As it involves nested collectors lol

#

3:44 am here, i should go

#

Thanks