From 9f23c0145e7a8118033e31ef1cc915a7e7f42de8 Mon Sep 17 00:00:00 2001 From: Roman Gräf Date: Sat, 5 Dec 2020 01:52:04 +0100 Subject: config opts --- minecrafttrivia/game.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'minecrafttrivia/game.py') diff --git a/minecrafttrivia/game.py b/minecrafttrivia/game.py index 3e8f725..e2373e6 100644 --- a/minecrafttrivia/game.py +++ b/minecrafttrivia/game.py @@ -36,14 +36,15 @@ class OngoingGame(ABC): async def start_signup(self): self.phase = GamePhase.SIGNUP + join_timeout = await self.config.join_timeout() embed = discord.Embed( title="Signups opened for new game of Minecraft trivia", - description="React to this message in order to join. You have 30 seconds to signup.", + description=f"React to this message in order to join. You have {join_timeout} seconds to signup.", ) embed.timestamp = datetime.now() self.signup_message = await self.channel.send(embed=embed) await self.signup_message.add_reaction(constants.POSITIVE_REACTION) - await asyncio.sleep(await self.config.join_timeout()) + await asyncio.sleep(join_timeout) embed.description = "Signups are now closed. Wait for the game to finish to start a new one." await self.signup_message.edit(embed=embed) self.participants = await utils.get_participants((await self.channel.fetch_message(self.signup_message.id)).reactions) @@ -62,7 +63,7 @@ class OngoingGame(ABC): await self.channel.send(embed=embed) async def gameloop(self): - for i in range(2):#todo + for i in range(await self.config.round_count()): await self.single_round(i) await self.conclude_game() -- cgit