diff options
-rw-r--r-- | bot/exts/evergreen/fun.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bot/exts/evergreen/fun.py b/bot/exts/evergreen/fun.py index 9d6ee29c..23715906 100644 --- a/bot/exts/evergreen/fun.py +++ b/bot/exts/evergreen/fun.py @@ -60,13 +60,15 @@ class Fun(Cog): @commands.command() async def roll(self, ctx: Context, num_rolls: int = 1) -> None: """Outputs a number of random dice emotes (up to 6).""" + output = "" if num_rolls > 6: num_rolls = 6 - - dice = (f"dice_{random.randint(1, 6)}" for _ in range(num_rolls)) - output = " ".join(getattr(Emojis, die, '') for die in dice) - - await ctx.send(output or ":no_entry: You must roll at least once.") + elif num_rolls < 1: + output = ":no_entry: You must roll at least once." + for _ in range(num_rolls): + dice = f"dice_{random.randint(1, 6)}" + output += getattr(Emojis, dice, '') + " " + await ctx.send(output.rstrip()) @commands.command(name="uwu", aliases=("uwuwize", "uwuify",)) async def uwu_command(self, ctx: Context, *, text: clean_content(fix_channel_mentions=True)) -> None: |