From e9b6ec4b5d1c73b587b2347460f45af18309133b Mon Sep 17 00:00:00 2001 From: xeals Date: Sat, 15 Apr 2023 11:44:59 +1000 Subject: [PATCH] seed random once on init --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index ff3d35f..e5dfc2a 100755 --- a/bot.py +++ b/bot.py @@ -49,6 +49,7 @@ class BotClient(discord.Client): ): super().__init__(intents=intents) self._leaguefacts = leaguefacts or [] + random.seed() async def on_ready(self): _log.info(f"ready as {self.user}") @@ -84,7 +85,6 @@ class BotClient(discord.Client): def _select_leaguefact(self) -> Optional[str]: if not self._leaguefacts: return None - random.seed() return random.choice(self._leaguefacts)