[Mod] Make [p]hackban use default days setting too. (#3437)

* Update kickban.py

* freaking whitespace
This commit is contained in:
jack1142 2020-01-24 11:30:32 +01:00 committed by Draper
parent 0a8e7f5663
commit 01c1fdfd16

View File

@ -246,7 +246,7 @@ class KickBanMixin(MixinMeta):
self,
ctx: commands.Context,
user_ids: commands.Greedy[RawUserIds],
days: Optional[int] = 0,
days: Optional[int] = None,
*,
reason: str = None,
):
@ -254,7 +254,6 @@ class KickBanMixin(MixinMeta):
User IDs need to be provided in order to ban
using this command"""
days = cast(int, days)
banned = []
errors = {}
@ -302,6 +301,9 @@ 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: