gh
This commit is contained in:
parent
df73f81da7
commit
97878f535f
3 changed files with 44 additions and 2 deletions
|
@ -31,6 +31,14 @@ if site_name == "Drama":
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
},
|
||||||
|
"grass": {
|
||||||
|
"kind": "grass",
|
||||||
|
"title": "Grass",
|
||||||
|
"description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
|
||||||
|
"icon": "fas fa-seedling",
|
||||||
|
"color": "text-success",
|
||||||
|
"price": 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -48,6 +48,14 @@ if site_name == "Drama":
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
},
|
||||||
|
"grass": {
|
||||||
|
"kind": "grass",
|
||||||
|
"title": "Grass",
|
||||||
|
"description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
|
||||||
|
"icon": "fas fa-seedling",
|
||||||
|
"color": "text-success",
|
||||||
|
"price": 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -35,6 +35,14 @@ def shop(v):
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
},
|
||||||
|
"grass": {
|
||||||
|
"kind": "grass",
|
||||||
|
"title": "Grass",
|
||||||
|
"description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
|
||||||
|
"icon": "fas fa-seedling",
|
||||||
|
"color": "text-success",
|
||||||
|
"price": 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
@ -112,6 +120,14 @@ def buy(v, award):
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
},
|
||||||
|
"grass": {
|
||||||
|
"kind": "grass",
|
||||||
|
"title": "Grass",
|
||||||
|
"description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
|
||||||
|
"icon": "fas fa-seedling",
|
||||||
|
"color": "text-success",
|
||||||
|
"price": 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
@ -175,14 +191,24 @@ def banaward_trigger(post=None, comment=None):
|
||||||
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for yet another day for {link}. Seriously man?")
|
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for yet another day for {link}. Seriously man?")
|
||||||
|
|
||||||
|
|
||||||
|
def grass_trigger(post=None, comment=None):
|
||||||
|
|
||||||
|
author = post.author if post else comment.author
|
||||||
|
link = f"[this post]({post.permalink})" if post else f"[this comment]({comment.permalink})"
|
||||||
|
|
||||||
|
author.ban(reason="grass award used")
|
||||||
|
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended permenantly for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!")
|
||||||
|
|
||||||
ACTIONS = {
|
ACTIONS = {
|
||||||
"ban": banaward_trigger
|
"ban": banaward_trigger,
|
||||||
|
"grass": grass_trigger
|
||||||
}
|
}
|
||||||
|
|
||||||
ALLOW_MULTIPLE = (
|
ALLOW_MULTIPLE = (
|
||||||
"ban",
|
"ban",
|
||||||
"shit",
|
"shit",
|
||||||
"fireflies"
|
"fireflies",
|
||||||
|
"grass"
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.post("/post/<pid>/awards")
|
@app.post("/post/<pid>/awards")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue