Trusty-cogs icon indicating copy to clipboard operation
Trusty-cogs copied to clipboard

[ImageMaker]

Open kablekompany opened this issue 3 years ago • 0 comments

Describe the bug On invocation of [p]pill [color] if color input is not acceptable, exception occurs.

To Reproduce Steps to reproduce the behavior:

  1. invoke [p]pill bluw
  2. Review exceptions log

Expected behavior Return error in chat or log

Desktop (please complete the following information):

  • Red vers. 3.4.1
  • Discord.py vers. 1.5.1

Additional context Line 318 in imagemaker.py: was going to PR but wasn't sure how you wanted to catch and return Maybe something along the lines of

            try:
                pill_image = await self.make_colour(colour)
                if pill_image is None:
                    await ctx.send("Something went wrong sorry!")
                    return
            except Exception as e:
                await ctx.send(f"Either that isn't a color I recognize, or something went wrong./nError: {e}")
                return

Much respect, dude!

kablekompany avatar Oct 26 '20 15:10 kablekompany