Enochsoul / soulbot-discord

Simple Discord bot for my RPG group.
0 stars 0 forks source link

Players who roll a die with a capital D #1

Closed wpattern closed 3 months ago

wpattern commented 3 years ago

Sometimes there are players who use the roll command with a capital d. The bot will not recognize this and do nothing.

If you were to add the following line to DiceRoller.py (line 29) just after async def roll(self, ctx, *, dice_roll: str): then it will replace any 'D' with 'd' and will continue on happily with the logic you have implemented:

dice_roll = dice_roll.replace("D", "d")

I would have submitted a pull request but did have access 😄

Enochsoul commented 3 years ago

Odd that Github didn't send me a notice of the issue posting. Alternatively I could also:

dice_roll = dice_roll.lower()

Either way, I'll have a look at it when I have a chance.

Thanks!

Enochsoul commented 3 months ago

Fixed in the latest updates.