This commit is contained in:
Aevann1 2021-10-18 20:38:52 +02:00
parent 38b0f30cdf
commit 82cc7eb7c0
2 changed files with 3 additions and 3 deletions

View file

@ -485,7 +485,7 @@ class User(Base):
return data
def ban(self, admin=None, reason=None, days=0):
def ban(self, admin=None, reason=None, days=0, discord=True):
if days > 0:
ban_time = int(time.time()) + (days * 86400)
@ -493,7 +493,7 @@ class User(Base):
else:
self.bannerurl = None
self.profileurl = None
if self.discord_id: remove_user(self)
if self.discord_id and discord: remove_user(self)
self.is_banned = admin.id if admin else AUTOJANNY_ACCOUNT
if reason: self.ban_reason = reason