refactor(bot): ⚰️ Remove dead code.

This commit is contained in:
Nyeki.py
2024-10-27 00:21:55 -03:00
parent 46f34b6680
commit ec00a557fa
+3 -15
View File
@@ -1,6 +1,6 @@
from multiprocessing import managers from multiprocessing import managers
from datetime import datetime, timezone, timedelta from datetime import datetime, timezone
def shard( def shard(
@@ -27,20 +27,8 @@ def shard(
bot.shutdown = shutdown bot.shutdown = shutdown
bot.scheduled_shutdown = scheduled_shutdown bot.scheduled_shutdown = scheduled_shutdown
try: print(f"Running shard {shard_id} with default loop.")
# Skip uvloop initialization, it stops tasks from running for some reason. bot.run(config.TOKEN)
raise ImportError()
import uvloop # pylint: disable=import-error
bot.loop = uvloop.new_event_loop()
print(f"Running shard {shard_id} with uvloop.")
except ImportError:
print(f"Running shard {shard_id} with default loop.")
finally:
bot.run(config.TOKEN)
def flush_process(): def flush_process():