forked from rDrama/rDrama
sdffsd
parent
e78619fc75
commit
a1bac3f460
|
@ -826,24 +826,18 @@ def ban_user(user_id, v):
|
||||||
if not user: abort(400)
|
if not user: abort(400)
|
||||||
|
|
||||||
if days > 0:
|
if days > 0:
|
||||||
if message:
|
if message: text = f"Your account has been suspended for {days} days for the following reason:\n\n> {message}"
|
||||||
text = f"Your account has been suspended for {days} days for the following reason:\n\n> {message}"
|
else: text = f"Your account has been suspended for {days} days."
|
||||||
else:
|
else:
|
||||||
text = f"Your account has been suspended for {days} days."
|
if message: text = f"Your account has been permanently suspended for the following reason:\n\n> {message}"
|
||||||
|
else: text = "Your account has been permanently suspended."
|
||||||
|
|
||||||
user.ban(admin=v, reason=reason, days=days)
|
user.ban(admin=v, reason=reason, days=days)
|
||||||
|
|
||||||
else:
|
|
||||||
if message:
|
|
||||||
text = f"Your account has been permanently suspended for the following reason:\n\n> {message}"
|
|
||||||
else:
|
|
||||||
text = "Your account has been permanently suspended."
|
|
||||||
|
|
||||||
user.ban(admin=v, reason=reason)
|
|
||||||
|
|
||||||
if request.values.get("alts", ""):
|
if request.values.get("alts", ""):
|
||||||
for x in user.alts:
|
for x in user.alts:
|
||||||
if x.admin_level > 0: break
|
if x.admin_level > 0: break
|
||||||
x.ban(admin=v, reason=reason)
|
user.ban(admin=v, reason=reason, days=days)
|
||||||
|
|
||||||
send_notification(user.id, text)
|
send_notification(user.id, text)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue