fixed removing the new comer role
This commit is contained in:
parent
6aae70c0c9
commit
0270ffc1e3
@ -286,9 +286,15 @@ async def verify_player(res_all_, steam_id2_, steam_account, member, discord_id,
|
|||||||
if channel1.name == 'logs-discord-allowed':
|
if channel1.name == 'logs-discord-allowed':
|
||||||
await channel1.send(f"{steam_account}Was allowed into the discord server. Discord account ({discord_id}) is associated to an unloze forum account: https://unloze.com/members/.{res_user_id[0]}/\nName {member.name}. Descriminator ID: {member.discriminator}")
|
await channel1.send(f"{steam_account}Was allowed into the discord server. Discord account ({discord_id}) is associated to an unloze forum account: https://unloze.com/members/.{res_user_id[0]}/\nName {member.name}. Descriminator ID: {member.discriminator}")
|
||||||
try:
|
try:
|
||||||
await member.remove_roles("new-comer")
|
for role in member.roles:
|
||||||
|
if role.name == "new-comer":
|
||||||
|
await member.remove_roles(role)
|
||||||
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
import traceback
|
||||||
|
error_msg = traceback.format_exc()
|
||||||
|
print("member name: ", member.name)
|
||||||
|
print("traceback happened: ", error_msg)
|
||||||
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
|
conn2.commit() #manual comitting should really not be needed. the context manager should handle that if this mysql package was properly made xd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user