Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -471,10 +471,12 @@ async def on_message(message):
|
|
471 |
# empty (no link created yet between discord_user_id and hf_user_name) so we can update
|
472 |
global_df.loc[global_df['discord_user_id'] == altered_member_id, 'hf_user_name'] = user['name']
|
473 |
global_df.loc[global_df['discord_user_id'] == altered_member_id, 'verified_date'] = verified_date
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
|
|
478 |
return
|
479 |
else:
|
480 |
await message.channel.send(f"The Discord account {member} is already verified! To change discord accounts or HF accounts, contact <@811235357663297546> or adam@huggingface.co")
|
@@ -504,8 +506,9 @@ async def on_message(message):
|
|
504 |
|
505 |
global_df.loc[len(global_df.index)] = row_data
|
506 |
await member.add_roles(role)
|
507 |
-
|
508 |
-
|
|
|
509 |
await bot.process_commands(message)
|
510 |
except Exception as e:
|
511 |
print(f"on_message Error: {e}")
|
|
|
471 |
# empty (no link created yet between discord_user_id and hf_user_name) so we can update
|
472 |
global_df.loc[global_df['discord_user_id'] == altered_member_id, 'hf_user_name'] = user['name']
|
473 |
global_df.loc[global_df['discord_user_id'] == altered_member_id, 'verified_date'] = verified_date
|
474 |
+
await member.add_roles(role)
|
475 |
+
if role in member.roles:
|
476 |
+
print(f"Updated hf_user_name for id {member.id} | discord_user_name {member} | hf_user_name {user['name']}")
|
477 |
+
await message.channel.send(f"Verification successful! [{member} <---> {user['name']}] π€")
|
478 |
+
await lunar.send(f"Verification successful! [{member} <---> {user['name']}] π€")
|
479 |
+
print(f"Verification successful! [{member} <---> {user['name']}] π€")
|
480 |
return
|
481 |
else:
|
482 |
await message.channel.send(f"The Discord account {member} is already verified! To change discord accounts or HF accounts, contact <@811235357663297546> or adam@huggingface.co")
|
|
|
506 |
|
507 |
global_df.loc[len(global_df.index)] = row_data
|
508 |
await member.add_roles(role)
|
509 |
+
if role in member.roles:
|
510 |
+
print(f"New record created for {member}")
|
511 |
+
print(f"------------------------------------------------------------------------")
|
512 |
await bot.process_commands(message)
|
513 |
except Exception as e:
|
514 |
print(f"on_message Error: {e}")
|