lunarflu HF staff commited on
Commit
1ac6a3f
·
verified ·
1 Parent(s): 12c4618

60 -> 30, 5 -> 3

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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(60)
77
  continue
78
  except Exception as e:
79
  print(f"Error fetching CSV: {e}")
80
- await asyncio.sleep(60)
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(5)
107
  lunar = bot.get_user(811235357663297546)
108
  if lunar:
109
  await lunar.send(f"Verified role given to {member}!")
110
- await asyncio.sleep(5)
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(60)
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