fix exception for empty strings in [p]choice (#4499)

This commit is contained in:
Fixator10 2020-10-18 11:46:11 +04:00 committed by GitHub
parent 33cf275862
commit 009dc9ae4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ class General(commands.Cog):
To denote options which include whitespace, you should use To denote options which include whitespace, you should use
double quotes. double quotes.
""" """
choices = [escape(c, mass_mentions=True) for c in choices] choices = [escape(c, mass_mentions=True) for c in choices if c]
if len(choices) < 2: if len(choices) < 2:
await ctx.send(_("Not enough options to pick from.")) await ctx.send(_("Not enough options to pick from."))
else: else: