forked from MarseyWorld/MarseyWorld
only add reason if there's a reason
parent
a84c6b6b24
commit
299dbceeeb
|
@ -163,7 +163,7 @@ def execute_snappy(post, v):
|
|||
text = f"@Snappy has banned you for **{days}** days for the following reason:\n\n> {reason}"
|
||||
send_repeatable_notification(v.id, text)
|
||||
duration = f"for {days} days"
|
||||
note = f'reason: "{reason}", duration: {duration}'
|
||||
note = f'duration: {duration}, reason: "{reason}"'
|
||||
ma=ModAction(
|
||||
kind="ban_user",
|
||||
user_id=snappy.id,
|
||||
|
|
|
@ -968,7 +968,7 @@ def ban_user(user_id, v):
|
|||
|
||||
send_repeatable_notification(user.id, text)
|
||||
|
||||
note = f'reason: "{reason}", duration: {duration}'
|
||||
note = f'duration: {duration}, reason: "{reason}"'
|
||||
ma=ModAction(
|
||||
kind="ban_user",
|
||||
user_id=v.id,
|
||||
|
@ -1029,7 +1029,9 @@ def agendaposter(user_id, v):
|
|||
|
||||
send_repeatable_notification(user.id, text)
|
||||
|
||||
note = f'reason: "{reason}", duration: {duration}'
|
||||
note = f'duration: {duration}'
|
||||
if reason: note += f', reason: "{reason}"'
|
||||
|
||||
ma=ModAction(
|
||||
kind="agendaposter",
|
||||
user_id=v.id,
|
||||
|
|
Loading…
Reference in New Issue