diff --git a/docker-compose.yml b/docker-compose.yml index 2759a7900..c7575871d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,6 @@ services: - COMMENT_SPAM_COUNT_THRESHOLD=10 - READ_ONLY=0 - BOT_DISABLE=0 - - COINS_NAME=Dramacoins - DEFAULT_TIME_FILTER=all - DEFAULT_THEME=midnight - DEFAULT_COLOR=ff66ac #YOU HAVE TO PICK ONE OF THOSE COLORS OR SHIT WILL BREAK: ff66ac, 805ad5, 62ca56, 38a169, 80ffff, 2a96f3, eb4963, ff0000, f39731, 30409f, 3e98a7, e4432d, 7b9ae4, ec72de, 7f8fa6, f8db58 diff --git a/files/routes/settings.py b/files/routes/settings.py index 8fabc528c..427e3fe1b 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -18,7 +18,6 @@ valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$") valid_password_regex = re.compile("^.{8,100}$") YOUTUBE_KEY = environ.get("YOUTUBE_KEY", "").strip() -COINS_NAME = environ.get("COINS_NAME").strip() GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip() IMGUR_KEY = environ.get("IMGUR_KEY").strip() GUMROAD_ID = environ.get("GUMROAD_ID", "tfcvri").strip() @@ -729,14 +728,14 @@ def settings_css(v): @auth_required def settings_profilecss_get(v): - if v.truecoins < 1000 and not v.patron and v.admin_level == 0 : return f"You must have +1000 {COINS_NAME} or be a paypig to set profile css." + if v.truecoins < 1000 and not v.patron and v.admin_level == 0 : return f"You must have +1000 truescore or be a paypig to set profile css." return render_template("settings_profilecss.html", v=v) @app.post("/settings/profilecss") @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def settings_profilecss(v): - if v.truecoins < 1000 and not v.patron: return f"You must have +1000 {COINS_NAME} or be a paypig to set profile css." + if v.truecoins < 1000 and not v.patron: return f"You must have +1000 truescore or be a paypig to set profile css." profilecss = request.values.get("profilecss").strip().replace('\\', '').strip()[:4000] v.profilecss = profilecss g.db.add(v) diff --git a/files/routes/users.py b/files/routes/users.py index e6100f3aa..2048ea884 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -253,9 +253,9 @@ def transfer_coins(v, username): amount = request.values.get("amount", "").strip() amount = int(amount) if amount.isdigit() else None - if amount is None or amount <= 0: return {"error": f"Invalid amount of {app.config['COINS_NAME']}."}, 400 - if v.coins < amount: return {"error": f"You don't have enough {app.config['COINS_NAME']}"}, 400 - if amount < 100: return {"error": f"You have to gift at least 100 {app.config['COINS_NAME']}."}, 400 + if amount is None or amount <= 0: return {"error": f"Invalid amount of coins."}, 400 + if v.coins < amount: return {"error": f"You don't have enough coins."}, 400 + if amount < 100: return {"error": f"You have to gift at least 100 coins."}, 400 if not v.patron and not receiver.patron and not v.alts_patron and not receiver.alts_patron: tax = math.ceil(amount*0.03) @@ -265,19 +265,19 @@ def transfer_coins(v, username): else: tax = 0 if TAX_RECEIVER_ID: - log_message = f"@{v.username} has transferred {amount} {app.config['COINS_NAME']} to @{receiver.username}" + log_message = f"@{v.username} has transferred {amount} coins to @{receiver.username}" send_repeatable_notification(TAX_RECEIVER_ID, log_message) receiver.coins += amount-tax v.coins -= amount - send_repeatable_notification(receiver.id, f":marseycapitalistmanlet: @{v.username} has gifted you {amount-tax} {app.config['COINS_NAME']}!") + send_repeatable_notification(receiver.id, f":marseycapitalistmanlet: @{v.username} has gifted you {amount-tax} coins!") g.db.add(receiver) g.db.add(v) g.db.commit() - return {"message": f"{amount-tax} {app.config['COINS_NAME']} transferred!"}, 200 + return {"message": f"{amount-tax} coins transferred!"}, 200 - return {"message": f"You can't transfer {app.config['COINS_NAME']} to yourself!"}, 400 + return {"message": f"You can't transfer coins to yourself!"}, 400 @app.post("/@/transfer_bux") diff --git a/files/templates/header.html b/files/templates/header.html index 54d66903e..10a48aee5 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -95,7 +95,7 @@
your profile picture
{{v.username}}
-
{{'COINS_NAME' | app_config}}{{v.coins}} {{'COINS_NAME' | app_config}}
+
coins{{v.coins}} coins
marseybux{{v.procoins}} Marseybux
diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index ab6b30e6c..ff3e7783d 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -4,7 +4,7 @@ {% block content %}

-
Top 25 by {{'COINS_NAME' | app_config}}
+
Top 25 by coins

 
diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 078565f45..8ecb8fb35 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -13,7 +13,7 @@ - + @@ -24,7 +24,7 @@ - + {% endblock %} @@ -103,7 +103,7 @@
{{u.coins}} - {{'COINS_NAME' | app_config}}   + coins   {{u.procoins}} marseybux   @@ -153,7 +153,7 @@ Message Get them help - Gift {{'COINS_NAME' | app_config}} + Gift coins Gift Marseybux {% if v.admin_level > 2 %} @@ -191,7 +191,7 @@
-
{{u.username}} will receive 0 {{'COINS_NAME' | app_config}}
+
{{u.username}} will receive 0 coins
@@ -377,7 +377,7 @@
{{u.coins}} - {{'COINS_NAME' | app_config}}   + coins   {{u.procoins}} marseybux   @@ -441,7 +441,7 @@ Follow Message Get them help - Gift {{'COINS_NAME' | app_config}} + Gift coins Gift Marseybux {% if v.admin_level > 2 %} @@ -479,7 +479,7 @@
-
{{u.username}} will receive 0 {{'COINS_NAME' | app_config}}
+
{{u.username}} will receive 0 coins