Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
simple invite to org
Browse files
app.py
CHANGED
@@ -467,6 +467,8 @@ async def add_exp(member_id):
|
|
467 |
@bot.event
|
468 |
async def on_message(message):
|
469 |
global global_df
|
|
|
|
|
470 |
try:
|
471 |
if message.author.id not in bot_ids: # could change to if author does not have bot role (roleid)
|
472 |
print(f"adding exp from message {message.author}")
|
@@ -537,8 +539,8 @@ async def on_message(message):
|
|
537 |
await member.add_roles(role)
|
538 |
if role in member.roles:
|
539 |
print(f"Updated hf_user_name for id {member.id} | discord_user_name {member} | hf_user_name {user['name']}")
|
540 |
-
await message.channel.send(f"Verification successful! [{member} <---> {user['name']}] 🤗")
|
541 |
-
await lunar.send(f"Verification successful! [{member} <---> {user['name']}] 🤗")
|
542 |
print(f"Verification successful! [{member} <---> {user['name']}] 🤗")
|
543 |
return
|
544 |
else:
|
|
|
467 |
@bot.event
|
468 |
async def on_message(message):
|
469 |
global global_df
|
470 |
+
org_link = "https://huggingface.co/organizations/discord-community/share/wPKRAHYbAlaEaCxUxcqVyaaaeZcYagDvqc"
|
471 |
+
invite_message = "Click to join our community org on the HF Hub!"
|
472 |
try:
|
473 |
if message.author.id not in bot_ids: # could change to if author does not have bot role (roleid)
|
474 |
print(f"adding exp from message {message.author}")
|
|
|
539 |
await member.add_roles(role)
|
540 |
if role in member.roles:
|
541 |
print(f"Updated hf_user_name for id {member.id} | discord_user_name {member} | hf_user_name {user['name']}")
|
542 |
+
await message.channel.send(f"Verification successful! [{member} <---> {user['name']}] 🤗 {org_link} {invite_message}")
|
543 |
+
await lunar.send(f"Verification successful! [{member} <---> {user['name']}] 🤗 {org_link} {invite_message}")
|
544 |
print(f"Verification successful! [{member} <---> {user['name']}] 🤗")
|
545 |
return
|
546 |
else:
|