Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
60 -> 30, 5 -> 3
Browse files
app.py
CHANGED
@@ -73,11 +73,11 @@ async def give_verified_roles():
|
|
73 |
global_df = pd.read_csv(io.StringIO(csv_data))
|
74 |
except asyncio.TimeoutError:
|
75 |
print("CSV fetch timed out.")
|
76 |
-
await asyncio.sleep(
|
77 |
continue
|
78 |
except Exception as e:
|
79 |
print(f"Error fetching CSV: {e}")
|
80 |
-
await asyncio.sleep(
|
81 |
continue
|
82 |
|
83 |
guild = bot.get_guild(879548962464493619)
|
@@ -103,11 +103,11 @@ async def give_verified_roles():
|
|
103 |
if role not in member.roles:
|
104 |
await member.add_roles(role)
|
105 |
print(f"Role added to member: {member}")
|
106 |
-
await asyncio.sleep(
|
107 |
lunar = bot.get_user(811235357663297546)
|
108 |
if lunar:
|
109 |
await lunar.send(f"Verified role given to {member}!")
|
110 |
-
await asyncio.sleep(
|
111 |
await member.send(
|
112 |
f"Verification successful! [{member} <---> {row['discord_user_name']}] \n🤗 {org_link} {invite_message}"
|
113 |
)
|
@@ -116,7 +116,7 @@ async def give_verified_roles():
|
|
116 |
except Exception as e:
|
117 |
print(f"Error encountered: {e}")
|
118 |
|
119 |
-
await asyncio.sleep(
|
120 |
|
121 |
|
122 |
# runs discord bot in thread = helps avoid blocking calls
|
|
|
73 |
global_df = pd.read_csv(io.StringIO(csv_data))
|
74 |
except asyncio.TimeoutError:
|
75 |
print("CSV fetch timed out.")
|
76 |
+
await asyncio.sleep(30)
|
77 |
continue
|
78 |
except Exception as e:
|
79 |
print(f"Error fetching CSV: {e}")
|
80 |
+
await asyncio.sleep(30)
|
81 |
continue
|
82 |
|
83 |
guild = bot.get_guild(879548962464493619)
|
|
|
103 |
if role not in member.roles:
|
104 |
await member.add_roles(role)
|
105 |
print(f"Role added to member: {member}")
|
106 |
+
await asyncio.sleep(3)
|
107 |
lunar = bot.get_user(811235357663297546)
|
108 |
if lunar:
|
109 |
await lunar.send(f"Verified role given to {member}!")
|
110 |
+
await asyncio.sleep(3)
|
111 |
await member.send(
|
112 |
f"Verification successful! [{member} <---> {row['discord_user_name']}] \n🤗 {org_link} {invite_message}"
|
113 |
)
|
|
|
116 |
except Exception as e:
|
117 |
print(f"Error encountered: {e}")
|
118 |
|
119 |
+
await asyncio.sleep(30)
|
120 |
|
121 |
|
122 |
# runs discord bot in thread = helps avoid blocking calls
|