You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing out all the numbers from the argument using re.findall(r'\d+', die) returns a list, which can't be converted into an integer with int().
I assume joining the characters together would return a String of numbers, which can be cast into an integer to then do the comparison later in the code.
asyncdefroll(ctx, die: str, amount: int):
number_characters=re.findall(r'\d+', die)
ifnotnumber_charactersornumber_characters<2: # Comparison only works between congruent types!!! (Error: list < int)awaitctx.send(f'"{die}" is not a valid dice.')
return
The text was updated successfully, but these errors were encountered:
Parsing out all the numbers from the argument using
re.findall(r'\d+', die)
returns a list, which can't be converted into an integer withint()
.I assume joining the characters together would return a String of numbers, which can be cast into an integer to then do the comparison later in the code.
The text was updated successfully, but these errors were encountered: