mirror of
https://git.squeakyrat.moe/faggot-chan/
synced 2026-11-04 18:35:45 +01:00
made long random message extremely unlikely because it was annoying
:(
This commit is contained in:
1 parent
f55f7b1923
commit
f47d5b347f
1 file changed
+2
-3
@@ -196,14 +196,13 @@ async def random_dm():
|
|||||||
print(f"[{timestamp()}] random dm to {victim}: {result}")
|
print(f"[{timestamp()}] random dm to {victim}: {result}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await handle_error(f"[{timestamp()}] failed to send dm to {victim}: {e}", notify_user=victim)
|
await handle_error(f"[{timestamp()}] failed to send dm to {victim}: {e}", notify_user=victim)
|
||||||
|
|
||||||
async def random_message():
|
async def random_message():
|
||||||
await client.wait_until_ready()
|
await client.wait_until_ready()
|
||||||
while not client.is_closed():
|
while not client.is_closed():
|
||||||
await asyncio.sleep(480) #every 8 minutes
|
await asyncio.sleep(600) #every 10 minutes
|
||||||
if time.time() - last_server_message < QUIET_COOLDOWN: #only send if server has been quiet for 10 mins
|
if time.time() - last_server_message < QUIET_COOLDOWN: #only send if server has been quiet for 10 mins
|
||||||
continue
|
continue
|
||||||
if random.random() < 0.01: #1%
|
if random.random() < 0.0001: #0.001%
|
||||||
for guild in client.guilds:
|
for guild in client.guilds:
|
||||||
channel = discord.utils.get(guild.text_channels, name="general")
|
channel = discord.utils.get(guild.text_channels, name="general")
|
||||||
if channel:
|
if channel:
|
||||||
|
|||||||
Reference in new issue
Block a user