pizza
This commit is contained in:
parent
ddb2256a9f
commit
be2be7b743
4 changed files with 18 additions and 1 deletions
|
@ -226,6 +226,9 @@ def award_post(pid, v):
|
|||
|
||||
author = post.author
|
||||
|
||||
if author.id == PIZZASHILL_ID:
|
||||
return {"error": "Pizzashill is immune to awards."}, 403
|
||||
|
||||
if v.id != author.id:
|
||||
msg = f"@{v.username} has given your [post]({post.shortlink}) the {AWARDS[kind]['title']} Award!"
|
||||
if note: msg += f"\n\n> {note}"
|
||||
|
@ -444,6 +447,9 @@ def award_comment(cid, v):
|
|||
|
||||
author = c.author
|
||||
|
||||
if author.id == PIZZASHILL_ID:
|
||||
return {"error": "Pizzashill is immune to awards."}, 403
|
||||
|
||||
if v.id != author.id:
|
||||
msg = f"@{v.username} has given your [comment]({c.shortlink}) the {AWARDS[kind]['title']} Award!"
|
||||
if note: msg += f"\n\n> {note}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue