forked from MarseyWorld/MarseyWorld
delfector 2
parent
6fc9de8278
commit
a6a07f8143
|
@ -473,7 +473,7 @@ AWARDS = {
|
||||||
"deflector": {
|
"deflector": {
|
||||||
"kind": "deflector",
|
"kind": "deflector",
|
||||||
"title": "deflector",
|
"title": "deflector",
|
||||||
"description": "Causes all awards received for the next 10 hours to be deflected back at their giver.",
|
"description": "Causes most awards received for the next 10 hours to be deflected back at their giver.",
|
||||||
"icon": "fas fa-shield",
|
"icon": "fas fa-shield",
|
||||||
"color": "text-pink",
|
"color": "text-pink",
|
||||||
"price": 7000
|
"price": 7000
|
||||||
|
|
|
@ -232,7 +232,7 @@ def award_post(pid, v):
|
||||||
if kind == "benefactor" and author.id == v.id:
|
if kind == "benefactor" and author.id == v.id:
|
||||||
return {"error": "You can't use this award on yourself."}, 400
|
return {"error": "You can't use this award on yourself."}, 400
|
||||||
|
|
||||||
if author.deflector:
|
if author.deflector and AWARDS[kind]['price'] > 300 and kind not in ('pin','unpin'):
|
||||||
msg = f"@{v.username} has tried to give your [post]({post.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected and applied to them :marseytroll:"
|
msg = f"@{v.username} has tried to give your [post]({post.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"@{author.username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you :marseytroll:"
|
||||||
|
@ -459,7 +459,7 @@ def award_comment(cid, v):
|
||||||
if author.id == PIZZASHILL_ID:
|
if author.id == PIZZASHILL_ID:
|
||||||
return {"error": "Pizzashill is immune to awards."}, 403
|
return {"error": "Pizzashill is immune to awards."}, 403
|
||||||
|
|
||||||
if author.deflector:
|
if author.deflector and AWARDS[kind]['price'] > 300 and kind not in ('pin','unpin'):
|
||||||
msg = f"@{v.username} has tried to give your [comment]({c.shortlink}) the {AWARDS[kind]['title']} Award but it was deflected and applied to them :marseytroll:"
|
msg = f"@{v.username} has tried to give your [comment]({c.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"@{author.username} is under the effect of a deflector award; your {AWARDS[kind]['title']} Award has been deflected back to you :marseytroll:"
|
||||||
|
|
Loading…
Reference in New Issue