Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
speedup test
Browse files
app.py
CHANGED
@@ -71,17 +71,17 @@ async def give_verified_roles():
|
|
71 |
) as response:
|
72 |
if response.status != 200:
|
73 |
print(f"Failed to fetch CSV: HTTP {response.status}")
|
74 |
-
await asyncio.sleep(
|
75 |
continue
|
76 |
csv_data = await response.text()
|
77 |
global_df = pd.read_csv(io.StringIO(csv_data))
|
78 |
except asyncio.TimeoutError:
|
79 |
print("CSV fetch timed out.")
|
80 |
-
await asyncio.sleep(
|
81 |
continue
|
82 |
except Exception as e:
|
83 |
print(f"Error fetching CSV: {e}")
|
84 |
-
await asyncio.sleep(
|
85 |
continue
|
86 |
|
87 |
guild = bot.get_guild(879548962464493619)
|
@@ -101,7 +101,7 @@ async def give_verified_roles():
|
|
101 |
continue
|
102 |
if role not in member.roles:
|
103 |
await member.add_roles(role)
|
104 |
-
await asyncio.sleep(
|
105 |
print(f"Role added to member: {member}")
|
106 |
lunar = bot.get_user(811235357663297546)
|
107 |
if lunar:
|
@@ -109,11 +109,11 @@ async def give_verified_roles():
|
|
109 |
await member.send(
|
110 |
f"Verification successful! [{member} <---> {row['discord_user_name']}] \n🤗 {org_link} {invite_message}"
|
111 |
)
|
112 |
-
await asyncio.sleep(
|
113 |
|
114 |
except Exception as e:
|
115 |
print(f"Error encountered: {e}")
|
116 |
-
await asyncio.sleep(30
|
117 |
|
118 |
def run_bot():
|
119 |
bot.run(DISCORD_TOKEN)
|
|
|
71 |
) as response:
|
72 |
if response.status != 200:
|
73 |
print(f"Failed to fetch CSV: HTTP {response.status}")
|
74 |
+
await asyncio.sleep(30)
|
75 |
continue
|
76 |
csv_data = await response.text()
|
77 |
global_df = pd.read_csv(io.StringIO(csv_data))
|
78 |
except asyncio.TimeoutError:
|
79 |
print("CSV fetch timed out.")
|
80 |
+
await asyncio.sleep(30)
|
81 |
continue
|
82 |
except Exception as e:
|
83 |
print(f"Error fetching CSV: {e}")
|
84 |
+
await asyncio.sleep(30)
|
85 |
continue
|
86 |
|
87 |
guild = bot.get_guild(879548962464493619)
|
|
|
101 |
continue
|
102 |
if role not in member.roles:
|
103 |
await member.add_roles(role)
|
104 |
+
#await asyncio.sleep(1)
|
105 |
print(f"Role added to member: {member}")
|
106 |
lunar = bot.get_user(811235357663297546)
|
107 |
if lunar:
|
|
|
109 |
await member.send(
|
110 |
f"Verification successful! [{member} <---> {row['discord_user_name']}] \n🤗 {org_link} {invite_message}"
|
111 |
)
|
112 |
+
#await asyncio.sleep(1)
|
113 |
|
114 |
except Exception as e:
|
115 |
print(f"Error encountered: {e}")
|
116 |
+
await asyncio.sleep(10) # 30
|
117 |
|
118 |
def run_bot():
|
119 |
bot.run(DISCORD_TOKEN)
|