pumpkin-py / pumpkin-fun

Fun modules as extensions of pumpkin.py bot framework
GNU General Public License v3.0
0 stars 21 forks source link

Pick command not work correctly #110

Open jedla97 opened 1 year ago

jedla97 commented 1 year ago

Hi when using pick command there were discovered incorrect behavior of this command. The problem is that the (https://github.com/pumpkin-py/pumpkin-fun/blob/main/rand/module.py#LL60C18-L60C18)[code] looking for ? but it's not depend on position where it's located.

For example:

-pick Monday Wednesday? Friday

It saying that there is not enough arguments, which is incorrect as there are 3 args.

When used this:

-pick Maybe "Did I drink enough?" Yes No

It just take last 2 arguments (yes and no) and Maybe is omitted.

In my point of view only the first argument should be checked if contains ?.

Possible workaround is use backtick ( ` ) for example

-pick Monday 'Wednesday?' Friday