delfector 2

master
Aevann1 2022-03-24 00:49:18 +02:00
parent 6fc9de8278
commit a6a07f8143
2 changed files with 3 additions and 3 deletions

View File

@ -473,7 +473,7 @@ AWARDS = {
"deflector": {
"kind": "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",
"color": "text-pink",
"price": 7000

View File

@ -232,7 +232,7 @@ def award_post(pid, v):
if kind == "benefactor" and author.id == v.id:
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:"
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:"
@ -459,7 +459,7 @@ def award_comment(cid, v):
if author.id == PIZZASHILL_ID:
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:"
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:"