aboutsummaryrefslogtreecommitdiff
path: root/minecrafttrivia/game.py
diff options
context:
space:
mode:
authorRoman Gräf <romangraef@loves.dicksinhisan.us>2020-12-05 01:52:04 +0100
committerRoman Gräf <romangraef@loves.dicksinhisan.us>2020-12-05 01:52:04 +0100
commit9f23c0145e7a8118033e31ef1cc915a7e7f42de8 (patch)
tree494ed2eeaac6144463d02b18ee676dc4d59d1d91 /minecrafttrivia/game.py
parent5c1651f902f0e8553d1e19feaacd53e32ec2d558 (diff)
downloadRedCog-MinecraftTrivia-9f23c0145e7a8118033e31ef1cc915a7e7f42de8.tar.gz
RedCog-MinecraftTrivia-9f23c0145e7a8118033e31ef1cc915a7e7f42de8.tar.bz2
RedCog-MinecraftTrivia-9f23c0145e7a8118033e31ef1cc915a7e7f42de8.zip
config opts
Diffstat (limited to 'minecrafttrivia/game.py')
-rw-r--r--minecrafttrivia/game.py7
1 files changed, 4 insertions, 3 deletions
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()