Fix for the unknown days argument on hackban. (#3475)

This commit is contained in:
Kowlin 2020-01-30 18:55:11 +01:00 committed by GitHub
parent 6fa02b1a8d
commit b64802b92f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,6 +308,9 @@ class KickBanMixin(MixinMeta):
await ctx.send_help()
return
if days is None:
days = await self.settings.guild(guild).default_days()
if not (0 <= days <= 7):
await ctx.send(_("Invalid days. Must be between 0 and 7."))
return
@ -329,9 +332,6 @@ class KickBanMixin(MixinMeta):
await show_results()
return
if days is None:
days = await self.settings.guild(guild).default_days()
for user_id in user_ids:
user = guild.get_member(user_id)
if user is not None: