Remove vestigial user ID special cases.
This commit is contained in:
parent
010c56a35e
commit
9de6f20dea
13 changed files with 11 additions and 94 deletions
|
@ -115,10 +115,6 @@ def buy(v, award):
|
|||
g.db.add(award_object)
|
||||
|
||||
g.db.add(v)
|
||||
|
||||
if CARP_ID and v.id != CARP_ID and og_price >= 10000:
|
||||
send_repeatable_notification(CARP_ID, f"@{v.username} has bought a `{award}` award!")
|
||||
|
||||
g.db.commit()
|
||||
|
||||
return {"message": "Award bought!"}
|
||||
|
@ -158,9 +154,6 @@ def award_post(pid, v):
|
|||
|
||||
author = post.author
|
||||
|
||||
if author.id in (PIZZASHILL_ID, DAD_ID) and v.id not in (PIZZASHILL_ID, DAD_ID):
|
||||
return {"error": "This user is immune to awards."}, 403
|
||||
|
||||
if kind == "benefactor" and author.id == v.id:
|
||||
return {"error": "You can't use this award on yourself."}, 400
|
||||
|
||||
|
@ -387,9 +380,6 @@ def award_comment(cid, v):
|
|||
|
||||
author = c.author
|
||||
|
||||
if author.id in (PIZZASHILL_ID, DAD_ID) and v.id not in (PIZZASHILL_ID, DAD_ID):
|
||||
return {"error": "This user is immune to awards."}, 403
|
||||
|
||||
if v.id != author.id:
|
||||
if author.deflector and AWARDS[kind]['price'] > 300 and kind not in ('pin','unpin','benefactor'):
|
||||
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:"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue