vivinano / MudaeAutoBot

python bot that uses strictly the **Discord API** to Roll,Claim,and Kakera Snipe in Mudae. 5/10/21 project converted over to discum library
Apache License 2.0
143 stars 47 forks source link

client().addReaction to many variables (custom emoji) #178

Closed D4rknxss closed 2 years ago

D4rknxss commented 2 years ago

Hello, I have a small problem in my discord server, we added several custom reactions and when the bot must take a character it bugs and it displays this unknown

vivinano commented 2 years ago

Well that would be inproper way to add reactions as you can see how the error message you just passed it 14 arguments when it is only expecting 4

D4rknxss commented 2 years ago

Well that would be inproper way to add reactions as you can see how the error message you just passed it 14 arguments when it is only expecting 4

So the bot can only accept a maximum of 4 custom reactions if I understand correctly ?

vivinano commented 2 years ago

No the in that area of the code it just send the one emoji that is set any other emoji just overloads the method

If you want to add more than 1 custom emoji then you need to add more logic statements then just added them on the the send_emoji function

D4rknxss commented 2 years ago

No the in that area of the code it just send the one emoji that is set any other emoji just overloads the method

If you want to add more than 1 custom emoji then you need to add more logic statements then just added them on the the send_emoji function

Can you show an example if possible please image

vivinano commented 2 years ago

Showing a example in this case would be technically coding that interactive but how you would want to do it would be

Do an if statement to check if the count of arguments excedd 1 and then if it does then do a random selection

Personally I do not understand why this is needed as the code already functions in a way to detect the emoji that is present on the character and react accordingly

D4rknxss commented 2 years ago

okk I see, but sometimes when I look at the rolls the bot reacts with the heart instead of the emote that appears on the card image

how to fix it

vivinano commented 2 years ago

There might be issue with delays and timings if it goes to fast it reacts with the heart as it doesn’t detect the other emoji being added

Sent from my iPhone

On Jun 23, 2022, at 6:49 PM, D4rknxss @.***> wrote:

 okk I see, but sometimes when I look at the rolls the bot reacts with the heart instead of the emote that appears on the card

how to fix it

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

D4rknxss commented 2 years ago

thanks, I finally solved the problem, it's just that I had set the time sleep to .0 btw I have a question about the json settings what is the best claim delay so that it's fast enough to snipe but not too fast either?

vivinano commented 2 years ago

it depends on various factors some out of your control

vivinano commented 1 year ago

That depends

As you computer will first have to process the code > make a request to the api > send that request thru the internet > arrives at discord it says okay sure

So you can only really control at that first level every thing else in between and the end is out of your control

Sent from my iPhone

On Jun 24, 2022, at 9:11 AM, D4rknxss @.***> wrote:

 thanks, I finally solved the problem, it's just that I had set the time sleep to .0 btw I have a question about the json settings what is the best claim delay so that it's fast enough to snipe but not too fast either?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.