This commit is contained in:
Aevann1 2021-08-04 18:00:57 +02:00
parent 254995d1e4
commit 90815f5fba
16 changed files with 70 additions and 108 deletions

View file

@ -7,9 +7,8 @@ SERVER_ID = environ.get("DISCORD_SERVER_ID",'').strip()
CLIENT_ID = environ.get("DISCORD_CLIENT_ID",'').strip()
CLIENT_SECRET = environ.get("DISCORD_CLIENT_SECRET",'').strip()
BOT_TOKEN = environ.get("DISCORD_BOT_TOKEN").strip()
coins_name = environ.get("coins_name").strip()
DISCORD_ENDPOINT = "https://discordapp.com/api/v6"
WELCOME_CHANNEL="846509313941700618"
@app.get("/discord")
@ -17,7 +16,7 @@ WELCOME_CHANNEL="846509313941700618"
def join_discord(v):
if v.is_banned != 0: return "You're banned"
if v.admin_level == 0 and v.dramacoins < 150: return "You must earn 150 dramacoins before entering the Discord server. You earn dramacoins by making posts/comments and getting upvoted."
if v.admin_level == 0 and v.coins < 150: return f"You must earn 150 {coins_name} before entering the Discord server. You earn {coins_name} by making posts/comments and getting upvoted."
now=int(time.time())
@ -126,7 +125,7 @@ def discord_redirect(v):
time.sleep(0.1)
if v.dramacoins > 100: add_role(v, "linked")
if v.coins > 100: add_role(v, "linked")
else: add_role(v, "norep")
else: