forked from rDrama/rDrama
minor syntax change
parent
7141eafdf5
commit
fa15b1fdf8
|
@ -187,12 +187,11 @@ def execute_snappy(post:Submission, v:User):
|
||||||
text = f"@Snappy has banned you for **{days}** days for the following reason:\n\n> {reason}"
|
text = f"@Snappy has banned you for **{days}** days for the following reason:\n\n> {reason}"
|
||||||
send_repeatable_notification(v.id, text)
|
send_repeatable_notification(v.id, text)
|
||||||
duration = f"for {days} days"
|
duration = f"for {days} days"
|
||||||
note = f'duration: {duration}, reason: "{reason}"'
|
|
||||||
ma=ModAction(
|
ma=ModAction(
|
||||||
kind="ban_user",
|
kind="ban_user",
|
||||||
user_id=snappy.id,
|
user_id=snappy.id,
|
||||||
target_user_id=v.id,
|
target_user_id=v.id,
|
||||||
_note=note
|
_note=f'duration: {duration}, reason: "{reason}"'
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
post.bannedfor = f'{duration} by @Snappy'
|
post.bannedfor = f'{duration} by @Snappy'
|
||||||
|
@ -489,12 +488,11 @@ def execute_lawlz_actions(v:User, p:Submission):
|
||||||
p.stickied = "AutoJanny"
|
p.stickied = "AutoJanny"
|
||||||
p.distinguish_level = 6
|
p.distinguish_level = 6
|
||||||
p.flair = filter_emojis_only(":ben10: Required Reading")
|
p.flair = filter_emojis_only(":ben10: Required Reading")
|
||||||
pin_time = 'for 1 day'
|
|
||||||
ma_1=ModAction(
|
ma_1=ModAction(
|
||||||
kind="pin_post",
|
kind="pin_post",
|
||||||
user_id=AUTOJANNY_ID,
|
user_id=AUTOJANNY_ID,
|
||||||
target_submission_id=p.id,
|
target_submission_id=p.id,
|
||||||
_note=pin_time
|
_note='for 1 day'
|
||||||
)
|
)
|
||||||
ma_2=ModAction(
|
ma_2=ModAction(
|
||||||
kind="distinguish_post",
|
kind="distinguish_post",
|
||||||
|
|
Loading…
Reference in New Issue