devrama
This commit is contained in:
parent
ccf949fb93
commit
7e9622a118
7 changed files with 290 additions and 278 deletions
262
badges.json
Normal file
262
badges.json
Normal file
|
@ -0,0 +1,262 @@
|
||||||
|
{
|
||||||
|
"1": {
|
||||||
|
"name": "Alpha User",
|
||||||
|
"description": "Joined during open alpha"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"name": "Verified Email",
|
||||||
|
"description": "Verified Email"
|
||||||
|
},
|
||||||
|
"3": {
|
||||||
|
"name": "Code Contributor",
|
||||||
|
"description": "Contributed to the site's source code"
|
||||||
|
},
|
||||||
|
"4": {
|
||||||
|
"name": "White Hat",
|
||||||
|
"description": "Responsibly reported a security issue"
|
||||||
|
},
|
||||||
|
"6": {
|
||||||
|
"name": "Beta User",
|
||||||
|
"description": "Joined during open beta"
|
||||||
|
},
|
||||||
|
"7": {
|
||||||
|
"name": "Bug Chaser",
|
||||||
|
"description": "Found a bug"
|
||||||
|
},
|
||||||
|
"10": {
|
||||||
|
"name": "Bronze Recruiter",
|
||||||
|
"description": "Recruited 1 friend to join the site"
|
||||||
|
},
|
||||||
|
"11": {
|
||||||
|
"name": "Silver Recruiter",
|
||||||
|
"description": "Recruited 10 friends to join the site"
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"name": "Gold Recruiter",
|
||||||
|
"description": "Recruited 100 friends to join the site"
|
||||||
|
},
|
||||||
|
"15": {
|
||||||
|
"name": "Idea Maker",
|
||||||
|
"description": "Had a good idea for the site which was implemented by the developers"
|
||||||
|
},
|
||||||
|
"16": {
|
||||||
|
"name": "Marsey Master",
|
||||||
|
"description": "Contributed 10 (or more!!!!) Marsey emojis ✨"
|
||||||
|
},
|
||||||
|
"17": {
|
||||||
|
"name": "Marsey Artisan",
|
||||||
|
"description": "Contributed a Marsey emoji ✨"
|
||||||
|
},
|
||||||
|
"18": {
|
||||||
|
"name": "Artisan",
|
||||||
|
"description": "Contributed to site artwork"
|
||||||
|
},
|
||||||
|
"21": {
|
||||||
|
"name": "Paypig",
|
||||||
|
"description": "Contributed at least $5"
|
||||||
|
},
|
||||||
|
"22": {
|
||||||
|
"name": "Renthog",
|
||||||
|
"description": "Contributed at least $10"
|
||||||
|
},
|
||||||
|
"23": {
|
||||||
|
"name": "Landchad",
|
||||||
|
"description": "Contributed at least $20"
|
||||||
|
},
|
||||||
|
"24": {
|
||||||
|
"name": "Terminally online turboautist",
|
||||||
|
"description": "Contributed at least $50"
|
||||||
|
},
|
||||||
|
"25": {
|
||||||
|
"name": "Rich Bich",
|
||||||
|
"description": "Contributed at least $100"
|
||||||
|
},
|
||||||
|
"26": {
|
||||||
|
"name": "Rightoid",
|
||||||
|
"description": "Forced to use the rightoid theme"
|
||||||
|
},
|
||||||
|
"27": {
|
||||||
|
"name": "Lolcow",
|
||||||
|
"description": "Beautiful and valid milk provider"
|
||||||
|
},
|
||||||
|
"60": {
|
||||||
|
"name": "Unironically Retarded",
|
||||||
|
"description": "Demonstrated a wholesale inability to read the room"
|
||||||
|
},
|
||||||
|
"61": {
|
||||||
|
"name": "Lab Rat",
|
||||||
|
"description": "Helped test features in development"
|
||||||
|
},
|
||||||
|
"62": {
|
||||||
|
"name": "Master Baiter",
|
||||||
|
"description": "For outstanding achievement in the field of catching fish"
|
||||||
|
},
|
||||||
|
"63": {
|
||||||
|
"name": "Balls",
|
||||||
|
"description": "I wrote carp on my balls as a sign of submission"
|
||||||
|
},
|
||||||
|
"64": {
|
||||||
|
"name": "The Other Kind Of Good Journalist",
|
||||||
|
"description": "Contributed positive media attention to the site"
|
||||||
|
},
|
||||||
|
"65": {
|
||||||
|
"name": "2021 Spooooooky Marsey Artist",
|
||||||
|
"description": "Contributed a VERY SCARY Marsey for Halloween 2021!"
|
||||||
|
},
|
||||||
|
"66": {
|
||||||
|
"name": "Sk8r Boi",
|
||||||
|
"description": "Certifies that this user is NOT a poser"
|
||||||
|
},
|
||||||
|
"67": {
|
||||||
|
"name": "Unpausable",
|
||||||
|
"description": "Spent 40,000 coins on an unpausable profile anthem"
|
||||||
|
},
|
||||||
|
"68": {
|
||||||
|
"name": "Pause Button",
|
||||||
|
"description": "Spent 20,000 coins on a profile anthem pause button"
|
||||||
|
},
|
||||||
|
"69": {
|
||||||
|
"name": "Little Big Spender",
|
||||||
|
"description": "Dropped 10,000 coins at the shop"
|
||||||
|
},
|
||||||
|
"70": {
|
||||||
|
"name": "Big Spender",
|
||||||
|
"description": "Dropped 100,000 coins at the shop"
|
||||||
|
},
|
||||||
|
"71": {
|
||||||
|
"name": "Big Big Spender",
|
||||||
|
"description": "Dropped 250,000 coins at the shop"
|
||||||
|
},
|
||||||
|
"72": {
|
||||||
|
"name": "Big Big Big Spender",
|
||||||
|
"description": "Dropped 500,000 coins at the shop"
|
||||||
|
},
|
||||||
|
"73": {
|
||||||
|
"name": "Le Rich Gentlesir",
|
||||||
|
"description": "Spent a fucking million coins at the shop"
|
||||||
|
},
|
||||||
|
"74": {
|
||||||
|
"name": "Grass Toucher",
|
||||||
|
"description": "Awarded for molesting plant life"
|
||||||
|
},
|
||||||
|
"75": {
|
||||||
|
"name": "Halloween 21",
|
||||||
|
"description": "Awarded for surviving Homoween 2021"
|
||||||
|
},
|
||||||
|
"76": {
|
||||||
|
"name": "Low Roller",
|
||||||
|
"description": "Bought 10 lootboxes"
|
||||||
|
},
|
||||||
|
"77": {
|
||||||
|
"name": "Middle Roller",
|
||||||
|
"description": "Bought 50 lootboxes"
|
||||||
|
},
|
||||||
|
"78": {
|
||||||
|
"name": "High Roller",
|
||||||
|
"description": "Bought 150 lootboxes"
|
||||||
|
},
|
||||||
|
"79": {
|
||||||
|
"name": "Merchant",
|
||||||
|
"description": "Contributed a new line of product to Marsey's Coin Emporium"
|
||||||
|
},
|
||||||
|
"80": {
|
||||||
|
"name": "Artist Laureate",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"81": {
|
||||||
|
"name": "Patron of the Arts",
|
||||||
|
"description": "Sponsored the creation of an approved Marsey"
|
||||||
|
},
|
||||||
|
"83": {
|
||||||
|
"name": "All-Seeing Eye",
|
||||||
|
"description": "Can view private profiles"
|
||||||
|
},
|
||||||
|
"84": {
|
||||||
|
"name": "Alt-Seeing Eye",
|
||||||
|
"description": "Can see alts"
|
||||||
|
},
|
||||||
|
"85": {
|
||||||
|
"name": "Sigma User",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"86": {
|
||||||
|
"name": "Holly Jolly Marsey Artist",
|
||||||
|
"description": "Contributed a VERY JOLLY Marsey for Christmas 2021!"
|
||||||
|
},
|
||||||
|
"87": {
|
||||||
|
"name": "Unblockable",
|
||||||
|
"description": "This user is unblockable"
|
||||||
|
},
|
||||||
|
"88": {
|
||||||
|
"name": "Provider",
|
||||||
|
"description": "This user provided a bountiful feast for Thanksgiving"
|
||||||
|
},
|
||||||
|
"89": {
|
||||||
|
"name": "Dinner",
|
||||||
|
"description": "Yes, it is edible"
|
||||||
|
},
|
||||||
|
"90": {
|
||||||
|
"name": "Fish",
|
||||||
|
"description": "This user cannot be unfollowed"
|
||||||
|
},
|
||||||
|
"91": {
|
||||||
|
"name": "Grinch",
|
||||||
|
"description": "This user is a joyless grinch who pays money to avoid having fun"
|
||||||
|
},
|
||||||
|
"92": {
|
||||||
|
"name": "NFT Artist",
|
||||||
|
"description": "Drew a marsey that was used as an NFT"
|
||||||
|
},
|
||||||
|
"93": {
|
||||||
|
"name": "NFT Owner",
|
||||||
|
"description": "Bought a marsey NFT"
|
||||||
|
},
|
||||||
|
"94": {
|
||||||
|
"name": "Progressive Stack Award",
|
||||||
|
"description": "Upvotes/downvotes on this user's posts and comments have double the ranking effect"
|
||||||
|
},
|
||||||
|
"95": {
|
||||||
|
"name": "Bird Site Award",
|
||||||
|
"description": "This user is limited to 140 characters"
|
||||||
|
},
|
||||||
|
"96": {
|
||||||
|
"name": "Flairlock Award",
|
||||||
|
"description": "This user's flair has been locked by someone else"
|
||||||
|
},
|
||||||
|
"97": {
|
||||||
|
"name": "Pizzashill Award",
|
||||||
|
"description": "This user has to make their posts and comments more than 280 characters"
|
||||||
|
},
|
||||||
|
"98": {
|
||||||
|
"name": "Marsey Award",
|
||||||
|
"description": "This user is limited to posting marseys"
|
||||||
|
},
|
||||||
|
"99": {
|
||||||
|
"name": "Sidebar Artist",
|
||||||
|
"description": "Contributed artwork featured on the sidebar"
|
||||||
|
},
|
||||||
|
"100": {
|
||||||
|
"name": "True Believer",
|
||||||
|
"description": "This user sees through communist lies"
|
||||||
|
},
|
||||||
|
"101": {
|
||||||
|
"name": "Banner Artist",
|
||||||
|
"description": "Contributed a banner image to the site"
|
||||||
|
},
|
||||||
|
"102": {
|
||||||
|
"name": "Christmas 21",
|
||||||
|
"description": "Awarded for surviving Fistmas 2021"
|
||||||
|
},
|
||||||
|
"103": {
|
||||||
|
"name": "Benefactor",
|
||||||
|
"description": "Gave the Benefactor award to someone"
|
||||||
|
},
|
||||||
|
"104": {
|
||||||
|
"name": "BADASS OUTLAW",
|
||||||
|
"description": "Bad boy who does not play by the rules"
|
||||||
|
},
|
||||||
|
"105": {
|
||||||
|
"name": "SCAM",
|
||||||
|
"description": "lmao get fucked retard"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB |
|
@ -5,6 +5,7 @@ from os import environ
|
||||||
from files.helpers.lazy import lazy
|
from files.helpers.lazy import lazy
|
||||||
from files.helpers.const import *
|
from files.helpers.const import *
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from json import loads
|
||||||
|
|
||||||
class Badge(Base):
|
class Badge(Base):
|
||||||
|
|
||||||
|
@ -24,31 +25,32 @@ class Badge(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def badge(self):
|
def badge(self):
|
||||||
return BADGES[self.badge_id]
|
with open("badges.json", 'r') as f:
|
||||||
|
return loads(f.read())[str(self.badge_id)]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def text(self):
|
def text(self):
|
||||||
if self.name == "Agendaposter":
|
if self.name == "Agendaposter":
|
||||||
ti = self.user.agendaposter_expires_utc
|
ti = self.user.agendaposter_expires_utc
|
||||||
if ti: text = self.badge['description'] + " until " + datetime.utcfromtimestamp(ti).strftime('%Y-%m-%d %H:%M:%S')
|
if ti: text = self.badge["description"] + " until " + datetime.utcfromtimestamp(ti).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
else: text = self.badge['description'] + " permanently"
|
else: text = self.badge["description"] + " permanently"
|
||||||
elif self.badge_id in (94,95,96,97,98):
|
elif self.badge_id in (94,95,96,97,98):
|
||||||
if self.badge_id == 94: ti = self.user.progressivestack
|
if self.badge_id == 94: ti = self.user.progressivestack
|
||||||
elif self.badge_id == 95: ti = self.user.bird
|
elif self.badge_id == 95: ti = self.user.bird
|
||||||
elif self.badge_id == 96: ti = self.user.flairchanged
|
elif self.badge_id == 96: ti = self.user.flairchanged
|
||||||
elif self.badge_id == 97: ti = self.user.longpost
|
elif self.badge_id == 97: ti = self.user.longpost
|
||||||
else: ti = self.user.marseyawarded
|
else: ti = self.user.marseyawarded
|
||||||
text = self.badge['description'] + " until " + datetime.utcfromtimestamp(ti).strftime('%Y-%m-%d %H:%M:%S')
|
text = self.badge["description"] + " until " + datetime.utcfromtimestamp(ti).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
elif self.description: text = self.description
|
elif self.description: text = self.description
|
||||||
elif self.badge['description']: text = self.badge['description']
|
elif self.badge["description"]: text = self.badge["description"]
|
||||||
else: return ''
|
else: return ''
|
||||||
return f' - {text}'
|
return f' - {text}'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def name(self):
|
def name(self):
|
||||||
return self.badge['name']
|
return self.badge["name"]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -11,8 +11,8 @@ if SITE == 'pcmemes.net': CC = "SPLASH MOUNTAIN"
|
||||||
else: CC = "COUNTRY CLUB"
|
else: CC = "COUNTRY CLUB"
|
||||||
CC_TITLE = CC.title()
|
CC_TITLE = CC.title()
|
||||||
|
|
||||||
with open("files/assets/js/emoji_modal.js", 'r') as file:
|
with open("files/assets/js/emoji_modal.js", 'r') as f:
|
||||||
marseytext = file.read().split('emojis: ')[1].split('cops police"},')[0] + '"}}'
|
marseytext = f.read().split('emojis: ')[1].split('cops police"},')[0] + '"}}'
|
||||||
result = loads(marseytext)
|
result = loads(marseytext)
|
||||||
|
|
||||||
marseys = {}
|
marseys = {}
|
||||||
|
@ -224,269 +224,6 @@ else:
|
||||||
PUSHER_ID = environ.get("PUSHER_ID", "").strip()
|
PUSHER_ID = environ.get("PUSHER_ID", "").strip()
|
||||||
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
||||||
|
|
||||||
BADGES = {
|
|
||||||
1: {
|
|
||||||
'name': 'Alpha User',
|
|
||||||
'description': 'Joined during open alpha'
|
|
||||||
},
|
|
||||||
2: {
|
|
||||||
'name': 'Verified Email',
|
|
||||||
'description': 'Verified Email'
|
|
||||||
},
|
|
||||||
3: {
|
|
||||||
'name': 'Code Contributor',
|
|
||||||
'description': "Contributed to the site's source code"
|
|
||||||
},
|
|
||||||
4: {
|
|
||||||
'name': 'White Hat',
|
|
||||||
'description': 'Responsibly reported a security issue'
|
|
||||||
},
|
|
||||||
6: {
|
|
||||||
'name': 'Beta User',
|
|
||||||
'description': 'Joined during open beta'
|
|
||||||
},
|
|
||||||
7: {
|
|
||||||
'name': 'Bug Chaser',
|
|
||||||
'description': 'Found a bug'
|
|
||||||
},
|
|
||||||
10: {
|
|
||||||
'name': 'Bronze Recruiter',
|
|
||||||
'description': 'Recruited 1 friend to join the site'
|
|
||||||
},
|
|
||||||
11: {
|
|
||||||
'name': 'Silver Recruiter',
|
|
||||||
'description': 'Recruited 10 friends to join the site'
|
|
||||||
},
|
|
||||||
12: {
|
|
||||||
'name': 'Gold Recruiter',
|
|
||||||
'description': 'Recruited 100 friends to join the site'
|
|
||||||
},
|
|
||||||
15: {
|
|
||||||
'name': 'Idea Maker',
|
|
||||||
'description': 'Had a good idea for the site which was implemented by the developers'
|
|
||||||
},
|
|
||||||
16: {
|
|
||||||
'name': 'Marsey Master',
|
|
||||||
'description': 'Contributed 10 (or more!!!!) Marsey emojis ✨'
|
|
||||||
},
|
|
||||||
17: {
|
|
||||||
'name': 'Marsey Artisan',
|
|
||||||
'description': 'Contributed a Marsey emoji ✨'
|
|
||||||
},
|
|
||||||
18: {
|
|
||||||
'name': 'Artisan',
|
|
||||||
'description': 'Contributed to site artwork'
|
|
||||||
},
|
|
||||||
21: {
|
|
||||||
'name': 'Paypig',
|
|
||||||
'description': 'Contributed at least $5'
|
|
||||||
},
|
|
||||||
22: {
|
|
||||||
'name': 'Renthog',
|
|
||||||
'description': 'Contributed at least $10'
|
|
||||||
},
|
|
||||||
23: {
|
|
||||||
'name': 'Landchad',
|
|
||||||
'description': 'Contributed at least $20'
|
|
||||||
},
|
|
||||||
24: {
|
|
||||||
'name': 'Terminally online turboautist',
|
|
||||||
'description': 'Contributed at least $50'
|
|
||||||
},
|
|
||||||
25: {
|
|
||||||
'name': 'Rich Bich',
|
|
||||||
'description': 'Contributed at least $100'
|
|
||||||
},
|
|
||||||
26: {
|
|
||||||
'name': 'Rightoid',
|
|
||||||
'description': 'Forced to use the rightoid theme'
|
|
||||||
},
|
|
||||||
27: {
|
|
||||||
'name': 'Lolcow',
|
|
||||||
'description': 'Beautiful and valid milk provider'
|
|
||||||
},
|
|
||||||
60: {
|
|
||||||
'name': 'Unironically Retarded',
|
|
||||||
'description': 'Demonstrated a wholesale inability to read the room'
|
|
||||||
},
|
|
||||||
61: {
|
|
||||||
'name': 'Lab Rat',
|
|
||||||
'description': 'Helped test features in development'
|
|
||||||
},
|
|
||||||
62: {
|
|
||||||
'name': 'Master Baiter',
|
|
||||||
'description': 'For outstanding achievement in the field of catching fish'
|
|
||||||
},
|
|
||||||
63: {
|
|
||||||
'name': 'Balls',
|
|
||||||
'description': 'I wrote carp on my balls as a sign of submission'
|
|
||||||
},
|
|
||||||
64: {
|
|
||||||
'name': 'The Other Kind Of Good Journalist',
|
|
||||||
'description': 'Contributed positive media attention to the site'
|
|
||||||
},
|
|
||||||
65: {
|
|
||||||
'name': '2021 Spooooooky Marsey Artist',
|
|
||||||
'description': 'Contributed a VERY SCARY Marsey for Halloween 2021!'
|
|
||||||
},
|
|
||||||
66: {
|
|
||||||
'name': 'Sk8r Boi',
|
|
||||||
'description': 'Certifies that this user is NOT a poser'
|
|
||||||
},
|
|
||||||
67: {
|
|
||||||
'name': 'Unpausable',
|
|
||||||
'description': 'Spent 40,000 coins on an unpausable profile anthem'
|
|
||||||
},
|
|
||||||
68: {
|
|
||||||
'name': 'Pause Button',
|
|
||||||
'description': 'Spent 20,000 coins on a profile anthem pause button'
|
|
||||||
},
|
|
||||||
69: {
|
|
||||||
'name': 'Little Big Spender',
|
|
||||||
'description': 'Dropped 10,000 coins at the shop'
|
|
||||||
},
|
|
||||||
70: {
|
|
||||||
'name': 'Big Spender',
|
|
||||||
'description': 'Dropped 100,000 coins at the shop'
|
|
||||||
},
|
|
||||||
71: {
|
|
||||||
'name': 'Big Big Spender',
|
|
||||||
'description': 'Dropped 250,000 coins at the shop'
|
|
||||||
},
|
|
||||||
72: {
|
|
||||||
'name': 'Big Big Big Spender',
|
|
||||||
'description': 'Dropped 500,000 coins at the shop'
|
|
||||||
},
|
|
||||||
73: {
|
|
||||||
'name': 'Le Rich Gentlesir',
|
|
||||||
'description': 'Spent a fucking million coins at the shop'
|
|
||||||
},
|
|
||||||
74: {
|
|
||||||
'name': 'Grass Toucher',
|
|
||||||
'description': 'Awarded for molesting plant life'
|
|
||||||
},
|
|
||||||
75: {
|
|
||||||
'name': 'Halloween 21',
|
|
||||||
'description': 'Awarded for surviving Homoween 2021'
|
|
||||||
},
|
|
||||||
76: {
|
|
||||||
'name': 'Low Roller',
|
|
||||||
'description': 'Bought 10 lootboxes'
|
|
||||||
},
|
|
||||||
77: {
|
|
||||||
'name': 'Middle Roller',
|
|
||||||
'description': 'Bought 50 lootboxes'
|
|
||||||
},
|
|
||||||
78: {
|
|
||||||
'name': 'High Roller',
|
|
||||||
'description': 'Bought 150 lootboxes'
|
|
||||||
},
|
|
||||||
79: {
|
|
||||||
'name': 'Merchant',
|
|
||||||
'description': "Contributed a new line of product to Marsey's Coin Emporium"
|
|
||||||
},
|
|
||||||
80: {
|
|
||||||
'name': 'Artist Laureate',
|
|
||||||
'description': ''
|
|
||||||
},
|
|
||||||
81: {
|
|
||||||
'name': 'Patron of the Arts',
|
|
||||||
'description': 'Sponsored the creation of an approved Marsey'
|
|
||||||
},
|
|
||||||
83: {
|
|
||||||
'name': 'All-Seeing Eye',
|
|
||||||
'description': 'Can view private profiles'
|
|
||||||
},
|
|
||||||
84: {
|
|
||||||
'name': 'Alt-Seeing Eye',
|
|
||||||
'description': 'Can see alts'
|
|
||||||
},
|
|
||||||
85: {
|
|
||||||
'name': 'Sigma User',
|
|
||||||
'description': ''
|
|
||||||
},
|
|
||||||
86: {
|
|
||||||
'name': 'Holly Jolly Marsey Artist',
|
|
||||||
'description': 'Contributed a VERY JOLLY Marsey for Christmas 2021!'
|
|
||||||
},
|
|
||||||
87: {
|
|
||||||
'name': 'Unblockable',
|
|
||||||
'description': 'This user is unblockable'
|
|
||||||
},
|
|
||||||
88: {
|
|
||||||
'name': 'Provider',
|
|
||||||
'description': 'This user provided a bountiful feast for Thanksgiving'
|
|
||||||
},
|
|
||||||
89: {
|
|
||||||
'name': 'Dinner',
|
|
||||||
'description': 'Yes, it is edible'
|
|
||||||
},
|
|
||||||
90: {
|
|
||||||
'name': 'Fish',
|
|
||||||
'description': 'This user cannot be unfollowed'
|
|
||||||
},
|
|
||||||
91: {
|
|
||||||
'name': 'Grinch',
|
|
||||||
'description': 'This user is a joyless grinch who pays money to avoid having fun'
|
|
||||||
},
|
|
||||||
92: {
|
|
||||||
'name': 'NFT Artist',
|
|
||||||
'description': 'Drew a marsey that was used as an NFT'
|
|
||||||
},
|
|
||||||
93: {
|
|
||||||
'name': 'NFT Owner',
|
|
||||||
'description': 'Bought a marsey NFT'
|
|
||||||
},
|
|
||||||
94: {
|
|
||||||
'name': 'Progressive Stack Award',
|
|
||||||
'description': "Upvotes/downvotes on this user's posts and comments have double the ranking effect"
|
|
||||||
},
|
|
||||||
95: {
|
|
||||||
'name': 'Bird Site Award',
|
|
||||||
'description': 'This user is limited to 140 characters'
|
|
||||||
},
|
|
||||||
96: {
|
|
||||||
'name': 'Flairlock Award',
|
|
||||||
'description': "This user's flair has been locked by someone else"
|
|
||||||
},
|
|
||||||
97: {
|
|
||||||
'name': 'Pizzashill Award',
|
|
||||||
'description': 'This user has to make their posts and comments more than 280 characters'
|
|
||||||
},
|
|
||||||
98: {
|
|
||||||
'name': 'Marsey Award',
|
|
||||||
'description': 'This user is limited to posting marseys'
|
|
||||||
},
|
|
||||||
99: {
|
|
||||||
'name': 'Sidebar Artist',
|
|
||||||
'description': 'Contributed artwork featured on the sidebar'
|
|
||||||
},
|
|
||||||
100: {
|
|
||||||
'name': 'True Believer',
|
|
||||||
'description': 'This user sees through communist lies'
|
|
||||||
},
|
|
||||||
101: {
|
|
||||||
'name': 'Banner Artist',
|
|
||||||
'description': 'Contributed a banner image to the site'
|
|
||||||
},
|
|
||||||
102: {
|
|
||||||
'name': 'Christmas 21',
|
|
||||||
'description': 'Awarded for surviving Fistmas 2021'
|
|
||||||
},
|
|
||||||
103: {
|
|
||||||
'name': 'Benefactor',
|
|
||||||
'description': 'Gave the Benefactor award to someone'
|
|
||||||
},
|
|
||||||
104: {
|
|
||||||
'name': 'BADASS OUTLAW',
|
|
||||||
'description': 'Bad boy who does not play by the rules'
|
|
||||||
},
|
|
||||||
105: {
|
|
||||||
'name': 'SCAM',
|
|
||||||
'description': 'lmao get fucked retard'
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
AWARDS = {
|
AWARDS = {
|
||||||
"snow": {
|
"snow": {
|
||||||
"kind": "snow",
|
"kind": "snow",
|
||||||
|
@ -768,7 +505,6 @@ AWARDS = {
|
||||||
"color": "text-gold",
|
"color": "text-gold",
|
||||||
"price": 50000
|
"price": 50000
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AWARDS2 = deepcopy(AWARDS)
|
AWARDS2 = deepcopy(AWARDS)
|
||||||
|
|
|
@ -10,6 +10,7 @@ from flask import *
|
||||||
from files.__main__ import app, limiter
|
from files.__main__ import app, limiter
|
||||||
from files.helpers.sanitize import filter_emojis_only
|
from files.helpers.sanitize import filter_emojis_only
|
||||||
import requests
|
import requests
|
||||||
|
from json import loads
|
||||||
|
|
||||||
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
|
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
|
||||||
|
|
||||||
|
@ -153,10 +154,17 @@ def api_comment(v):
|
||||||
else: abort(400)
|
else: abort(400)
|
||||||
|
|
||||||
body = request.values.get("body", "").strip()[:10000]
|
body = request.values.get("body", "").strip()[:10000]
|
||||||
|
|
||||||
if v.admin_level == 3 and parent_post.id == 37749:
|
if v.admin_level == 3:
|
||||||
with open(f"snappy_{SITE_NAME}.txt", "a") as f:
|
if parent_post.id == 37749:
|
||||||
f.write('\n{[para]}\n' + body)
|
with open(f"snappy_{SITE_NAME}.txt", "a") as f:
|
||||||
|
f.write('\n{[para]}\n' + body)
|
||||||
|
elif parent_post.id == 56 and request.files["file"]:
|
||||||
|
try: badge_body = loads(body)
|
||||||
|
except: return {"error": "You didn't follow the format, retard"}
|
||||||
|
badge_number = str(len(listdir('files/assets/images/badges'))+1)
|
||||||
|
with open("badges.json", 'r') as f: badges = loads(f.read())
|
||||||
|
badges[badge_number] = badge_body
|
||||||
|
|
||||||
if v.marseyawarded:
|
if v.marseyawarded:
|
||||||
marregex = list(re.finditer("^(:[!#]{0,2}m\w+:\s*)+$", body))
|
marregex = list(re.finditer("^(:[!#]{0,2}m\w+:\s*)+$", body))
|
||||||
|
@ -186,6 +194,10 @@ def api_comment(v):
|
||||||
elif parent_post.id == 37697:
|
elif parent_post.id == 37697:
|
||||||
filename = 'files/assets/images/Drama/banners/' + str(len(listdir('files/assets/images/Drama/banners'))+1) + '.webp'
|
filename = 'files/assets/images/Drama/banners/' + str(len(listdir('files/assets/images/Drama/banners'))+1) + '.webp'
|
||||||
process_image(file, filename)
|
process_image(file, filename)
|
||||||
|
elif parent_post.id == 56:
|
||||||
|
filename = f'files/assets/images/badges/{badge_number}.webp'
|
||||||
|
process_image(file, filename, 200)
|
||||||
|
with open('badges.json', 'w') as f: dump(badges, f)
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
|
|
|
@ -17,8 +17,8 @@ def privacy(v):
|
||||||
@app.get("/marseys")
|
@app.get("/marseys")
|
||||||
@auth_required
|
@auth_required
|
||||||
def emojis(v):
|
def emojis(v):
|
||||||
with open("marsey_count.json", 'r') as file:
|
with open("marsey_count.json", 'r') as f:
|
||||||
marsey_count = loads(file.read())
|
marsey_count = loads(f.read())
|
||||||
marsey_counted = []
|
marsey_counted = []
|
||||||
for k, val in marseys.items():
|
for k, val in marseys.items():
|
||||||
marsey_counted.append((k, val, marsey_count[k]))
|
marsey_counted.append((k, val, marsey_count[k]))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue