From 0d3264a7b011caf328c1e519fa2c7177a797ab7e Mon Sep 17 00:00:00 2001 From: skelmis Date: Thu, 4 Jan 2024 17:52:41 +1300 Subject: [PATCH] fix: misc --- suggestions/bot.py | 2 +- suggestions/main.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/suggestions/bot.py b/suggestions/bot.py index 396d9fa..329f260 100644 --- a/suggestions/bot.py +++ b/suggestions/bot.py @@ -46,7 +46,7 @@ class SuggestionsBot(commands.AutoShardedInteractionBot, BotBase): def __init__(self, *args, **kwargs): - self.version: str = "Public Release 3.18" + self.version: str = "Public Release 3.20" self.main_guild_id: int = 601219766258106399 self.legacy_beta_role_id: int = 995588041991274547 self.automated_beta_role_id: int = 998173237282361425 diff --git a/suggestions/main.py b/suggestions/main.py index f1d6074..f314eb4 100644 --- a/suggestions/main.py +++ b/suggestions/main.py @@ -9,6 +9,7 @@ import textwrap from traceback import format_exception +import aiohttp import cooldowns import disnake from disnake import Locale @@ -26,7 +27,9 @@ async def create_bot(database_wrapper=None) -> SuggestionsBot: is_prod: bool = True if os.environ.get("PROD", None) else False if is_prod: - total_shards = 53 + async with aiohttp.ClientSession() as session: + async with session.get("http://localhost:7878/shard-count") as resp: + total_shards = int(await resp.text()) cluster_id = int(os.environ["CLUSTER"]) offset = cluster_id - 1 number_of_shards_per_cluster = 10