initial commit
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
commit
c22dade3d5
21 files changed
+564
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import asyncio,random,time
|
||||
async def presence(bot,interval=45):
|
||||
await bot.wait_until_ready()
|
||||
since=int(time.time()*1000)
|
||||
while True:
|
||||
payload={"op":3,"d":{"status":"idle","since":since,"afk":True,"activities":[]}}
|
||||
try:
|
||||
if bot.ws:await bot.ws.send_as_json(payload)
|
||||
except Exception as e:bot.hook.put(f"presence update failed: {e!r}")
|
||||
await asyncio.sleep(interval+random.uniform(-5,5))
|
||||
Reference in new issue
Block a user