forked from rDrama/rDrama
parent
98f56af2e1
commit
8b722f2075
|
@ -176,11 +176,13 @@ def award_thing(v, thing_type, id):
|
||||||
return {"error": "User is already permanently marsified!"}, 403
|
return {"error": "User is already permanently marsified!"}, 403
|
||||||
|
|
||||||
if v.id != author.id:
|
if v.id != author.id:
|
||||||
|
safe_username = if thing.ghost then "The post's author" else f"@{author.username}"
|
||||||
|
|
||||||
if author.deflector and v.deflector:
|
if author.deflector and v.deflector:
|
||||||
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected on them, they also had a deflector up, so it bounced back and forth until it vaporized!"
|
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected on them, they also had a deflector up, so it bounced back and forth until it vaporized!"
|
||||||
send_repeatable_notification(author.id, msg)
|
send_repeatable_notification(author.id, msg)
|
||||||
|
|
||||||
msg = f"@{author.username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you but your deflector protected you, the award bounced back and forth until it vaporized!"
|
msg = f"{safe_username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you but your deflector protected you, the award bounced back and forth until it vaporized!"
|
||||||
send_repeatable_notification(v.id, msg)
|
send_repeatable_notification(v.id, msg)
|
||||||
|
|
||||||
g.db.delete(award)
|
g.db.delete(award)
|
||||||
|
@ -193,7 +195,7 @@ def award_thing(v, thing_type, id):
|
||||||
if author.deflector and v.id != AEVANN_ID and (AWARDS[kind]['price'] > 500 or kind == 'marsify' or kind.istitle()) and kind not in ('pin','unpin','benefactor'):
|
if author.deflector and v.id != AEVANN_ID and (AWARDS[kind]['price'] > 500 or kind == 'marsify' or kind.istitle()) and kind not in ('pin','unpin','benefactor'):
|
||||||
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected and applied to them :marseytroll:"
|
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected and applied to them :marseytroll:"
|
||||||
send_repeatable_notification(author.id, msg)
|
send_repeatable_notification(author.id, msg)
|
||||||
msg = f"@{author.username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you :marseytroll:"
|
msg = f"{safe_username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you :marseytroll:"
|
||||||
send_repeatable_notification(v.id, msg)
|
send_repeatable_notification(v.id, msg)
|
||||||
author = v
|
author = v
|
||||||
elif kind != 'spider':
|
elif kind != 'spider':
|
||||||
|
|
Loading…
Reference in New Issue