feat: Add Discord routes and configuration for bot key validation

This commit is contained in:
MrEisbear 2025-09-24 19:16:46 -05:00
parent df2242ea44
commit e09463b59c
5 changed files with 41 additions and 1 deletions

View file

@ -40,4 +40,13 @@ def token_gen(bid):
{"bid": bid, "exp": exptime},
jwt_key,
algorithm="HS256")
return token
return token
def bot_key(input_key):
bot_key = current_app.config['BOT_KEY']
if input_key != bot_key:
return False
if input_key == bot_key: # Extra Security which doesnt actually add anything but peace of mind.
return True
return "OhShit" # This should never happen??
# I dont think I should be a programmer, I dont even understand python and prefer golang or java or C#. ANYTHING THAT HAS {}