From a8a5aa9ef45bd00628aab31ece5bdf79a4f90b5e Mon Sep 17 00:00:00 2001 From: NovaOSS Admins Date: Sun, 15 Oct 2023 22:51:49 +0000 Subject: [PATCH] Fixes --- README.md | 5 +++++ api/core.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41f4438..e7c6a04 100644 --- a/README.md +++ b/README.md @@ -328,3 +328,8 @@ It is recommended to use the default ports, because this will make it easier to ## Run Production Server Make sure you have read all the according sections and have set up everything correctly. + +## Donations +When someone donates, manually update the credits and role to "helper" in the database. +For enterprise donations with more lax rate-limits, set the role to "enterprise". +Make sure to also include the donation in the `donations` database! diff --git a/api/core.py b/api/core.py index 29f9620..39f016a 100644 --- a/api/core.py +++ b/api/core.py @@ -42,7 +42,10 @@ async def check_core_auth(request): async def new_user_webhook(user: dict) -> None: """Runs when a new user is created.""" - dhook = Webhook(os.environ['DISCORD_WEBHOOK__USER_CREATED']) + try: + dhook = Webhook(os.environ['DISCORD_WEBHOOK__USER_CREATED']) + except KeyError: + return embed = Embed( description='New User',