seed random once on init
This commit is contained in:
parent
25a347cd88
commit
e9b6ec4b5d
2
bot.py
2
bot.py
@ -49,6 +49,7 @@ class BotClient(discord.Client):
|
|||||||
):
|
):
|
||||||
super().__init__(intents=intents)
|
super().__init__(intents=intents)
|
||||||
self._leaguefacts = leaguefacts or []
|
self._leaguefacts = leaguefacts or []
|
||||||
|
random.seed()
|
||||||
|
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
_log.info(f"ready as {self.user}")
|
_log.info(f"ready as {self.user}")
|
||||||
@ -84,7 +85,6 @@ class BotClient(discord.Client):
|
|||||||
def _select_leaguefact(self) -> Optional[str]:
|
def _select_leaguefact(self) -> Optional[str]:
|
||||||
if not self._leaguefacts:
|
if not self._leaguefacts:
|
||||||
return None
|
return None
|
||||||
random.seed()
|
|
||||||
return random.choice(self._leaguefacts)
|
return random.choice(self._leaguefacts)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user