updates so the verification goes through once 200 hours reached
This commit is contained in:
parent
51aafce337
commit
304fffa29c
@ -137,16 +137,21 @@ async def check_person_to_allow():
|
|||||||
jb_time = (jb_time / 60) / 60
|
jb_time = (jb_time / 60) / 60
|
||||||
total_time = ze_time + mg_time + zr_time + jb_time
|
total_time = ze_time + mg_time + zr_time + jb_time
|
||||||
if total_time > 200.0:
|
if total_time > 200.0:
|
||||||
|
print('member over 200 hours: ', member.name)
|
||||||
sql_statement = """
|
sql_statement = """
|
||||||
update unloze_playtimestats.player_time
|
update unloze_playtimestats.player_time
|
||||||
set discord_allowed = 1 where steam_id = %s
|
set discord_allowed = 1 where steam_id = %s
|
||||||
"""
|
"""
|
||||||
cur.execute(sql_statement, [steam_id2])
|
cur2.execute(sql_statement, [steam_id2])
|
||||||
for channel1 in d.get_all_channels():
|
for channel1 in d.get_all_channels():
|
||||||
if channel1.name == 'logs-discord-allowed':
|
if channel1.name == 'logs-discord-allowed':
|
||||||
await channel1.send(f"Allowed SteamID {steam_id2} into the discord server using the discord ID: {discord_id} and name {member.name}. Descriminator ID: {member.discriminator}")
|
await channel1.send(f"Allowed SteamID {steam_id2} into the discord server using the discord ID: {discord_id} and name {member.name}. Descriminator ID: {member.discriminator}")
|
||||||
member.remove_roles("new-comer")
|
try:
|
||||||
|
await member.remove_roles("new-comer")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
break
|
break
|
||||||
|
conn2.commit() #manual comitting should really not be needed. the context manager should handle that if this mysql package was properly made xd
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
check_person_to_allow.start()
|
check_person_to_allow.start()
|
||||||
|
Loading…
Reference in New Issue
Block a user