← All errors
medium runtime

DeprecationWarning: asyncio.get_event_loop() on Python 3.12+

Description

Warnings flood the console or the bot crashes with RuntimeError related to asyncio event loop on Python 3.12 or 3.13.

Cause

asyncio.get_event_loop() is deprecated inside running coroutines in Python 3.12+ and raises RuntimeError in 3.14. Code in hunt.py and captcha.py used this pattern.

Fix

Replace all asyncio.get_event_loop() calls inside async functions with asyncio.get_running_loop().

Code change

Before
deadline = asyncio.get_event_loop().time() + sleep_time
After
deadline = asyncio.get_running_loop().time() + sleep_time