iwa / Q-Bot

Custom Discord Bot made for Qumu's Discord Server
0 stars 0 forks source link

Tronky flavours not working #67

Closed Hyperfresh closed 4 years ago

Hyperfresh commented 4 years ago

Describe the bug If a flavour for tronky is defined in the command, it's not recognised.

Not 100% sure why it's doing it and what I did in the code to make it buggy lol.

Further investigation to see if it's actually bugged is suggested.

To Reproduce Steps to reproduce the behavior:

  1. ?tronky <mention> <flavour

Expected behavior Embed should say the flavour that the user chose.

Screenshots (I did this issue on GitHub mobile app, I'll send the images in a separate message)

Hyperfresh commented 4 years ago

Screenshots SmartSelect_20200531-090444_Discord SmartSelect_20200531-090551_Discord

iwa commented 4 years ago

will fix that tomorrow, might be my fault as I updated your code to match the new algorithm I made for the others actions commands

iwa commented 4 years ago

alright, the issue actually come from your code:

the 'in' operator don't exactly works like in python it'll return true if you test an existing method of the array, or an index number

to make the conditions working fine you have to use the includes method, available on arrays