From 08e95f24f4803d06bb9e393549a47618b24ddec5 Mon Sep 17 00:00:00 2001 From: jenz Date: Sun, 22 May 2022 14:49:22 +0200 Subject: [PATCH] removed unimportant message --- .../python/discord_verification.py | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/discord_verificiation/python/discord_verification.py b/discord_verificiation/python/discord_verification.py index a6fcf3c4..e439f3b5 100644 --- a/discord_verificiation/python/discord_verification.py +++ b/discord_verificiation/python/discord_verification.py @@ -11,7 +11,6 @@ intents = discord.Intents.default() intents.members = True client = discord.Client(intents=intents) - def from_steam64(sid): y = int(sid) - 76561197960265728 x = y % 2 @@ -68,29 +67,26 @@ async def on_message(message): zr_time = res[2] jb_time = res[3] allowed = res[4] - if allowed: - await message.channel.send(f"{target_name} You are already allowed into the discord server for surpassing 200 hours game time") - else: - ze_time_hours = math.floor((ze_time / 60) / 60) - ze_time_minutes = math.floor((ze_time / 60) - (ze_time_hours * 60)) + ze_time_hours = math.floor((ze_time / 60) / 60) + ze_time_minutes = math.floor((ze_time / 60) - (ze_time_hours * 60)) - mg_time_hours = math.floor((mg_time / 60) / 60) - mg_time_minutes = math.floor((mg_time / 60) - (mg_time_hours * 60)) + mg_time_hours = math.floor((mg_time / 60) / 60) + mg_time_minutes = math.floor((mg_time / 60) - (mg_time_hours * 60)) - zr_time_hours = math.floor((zr_time / 60) / 60) - zr_time_minutes = math.floor((zr_time / 60) - (zr_time_hours * 60)) + zr_time_hours = math.floor((zr_time / 60) / 60) + zr_time_minutes = math.floor((zr_time / 60) - (zr_time_hours * 60)) - jb_time_hours = math.floor((jb_time / 60) / 60) - jb_time_minutes = math.floor((jb_time / 60) - (jb_time_hours * 60)) + jb_time_hours = math.floor((jb_time / 60) / 60) + jb_time_minutes = math.floor((jb_time / 60) - (jb_time_hours * 60)) - total_time_hours = ze_time_hours + mg_time_hours + zr_time_hours + jb_time_hours - total_time_minutes = ze_time_minutes + mg_time_minutes + zr_time_minutes + jb_time_minutes - extra_hour = math.floor(total_time_minutes / 60) - if extra_hour > 0: - total_time_hours += extra_hour - total_time_minutes = math.floor(total_time_minutes - (extra_hour * 60)) + total_time_hours = ze_time_hours + mg_time_hours + zr_time_hours + jb_time_hours + total_time_minutes = ze_time_minutes + mg_time_minutes + zr_time_minutes + jb_time_minutes + extra_hour = math.floor(total_time_minutes / 60) + if extra_hour > 0: + total_time_hours += extra_hour + total_time_minutes = math.floor(total_time_minutes - (extra_hour * 60)) - await message.channel.send(f"Player: {target_name} \nZE playtime: {ze_time_hours} hours {ze_time_minutes} minutes.\nMG playtime: {mg_time_hours} hours {mg_time_minutes} minutes.\nZR playtime: {zr_time_hours} hours {zr_time_minutes} minutes.\nJB playtime: {jb_time_hours} hours {jb_time_minutes} minutes. \n\nYou need a total of 200 hours gametime for being allowed into the discord automatically: \nTotal Playtime: {total_time_hours} hours {total_time_minutes} minutes.") + await message.channel.send(f"Player: {target_name} \nZE playtime: {ze_time_hours} hours {ze_time_minutes} minutes.\nMG playtime: {mg_time_hours} hours {mg_time_minutes} minutes.\nZR playtime: {zr_time_hours} hours {zr_time_minutes} minutes.\nJB playtime: {jb_time_hours} hours {jb_time_minutes} minutes. \n\nYou need a total of 200 hours gametime for being allowed into the discord automatically: \nTotal Playtime: {total_time_hours} hours {total_time_minutes} minutes.") @loop(seconds = 10) async def check_person_to_allow():