From 6d090958096da47783fbcaf58c9905009ac035e5 Mon Sep 17 00:00:00 2001 From: victormylle Date: Tue, 17 Nov 2020 01:17:28 +0100 Subject: [PATCH] fixed quiz issue --- cogs/quiz.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cogs/quiz.py b/cogs/quiz.py index fa6886c..5d8318c 100644 --- a/cogs/quiz.py +++ b/cogs/quiz.py @@ -146,7 +146,7 @@ class Quiz(commands.Cog): #self.interval = (5, 10) self.interval = (5*60, 20*60) self.auto = False - self.timeout = 60*10 + self.timeout = 10*60 @commands.group(name="quiz",case_insensitive=True, invoke_without_command=True) @@ -193,7 +193,6 @@ class Quiz(commands.Cog): def create_answer_embed(self, question, answer, reward, author=None, linked=False, correct=False): embed = discord.Embed() - embed.colour = discord.Colour.orange() embed.add_field(name="Question:", value=f"{question}", inline=False) embed.add_field(name="Reward:", value=f"${reward} in game", inline=False) @@ -227,7 +226,7 @@ class Quiz(commands.Cog): playerdblinker.close() except asyncio.TimeoutError: await channel.send("Nobody found the correct answer!") - await message.channel.send(embed=self.create_answer_embed(f"Guess the number from 1 to {range}", str(random_number), ranges[range])) + await channel.send(embed=self.create_answer_embed(f"Guess the number from 1 to {range}", str(random_number), ranges[range])) await channel.edit(slowmode_delay=10) async def ask_question(self): @@ -244,7 +243,7 @@ class Quiz(commands.Cog): playerdblinker.close() except asyncio.TimeoutError: await channel.send("Nobody found the correct answer!") - await message.channel.send(embed=self.create_answer_embed(question[1], question[2], question[3])) + await channel.send(embed=self.create_answer_embed(question[1], question[2], question[3])) async def start_word_game(self): word = self.get_random_word() @@ -261,7 +260,7 @@ class Quiz(commands.Cog): playerdblinker.close() except asyncio.TimeoutError: await channel.send("Nobody found the correct answer!") - await message.channel.send(embed=self.create_answer_embed(f"Find the word from: {shaken_word}", word["word"], word["reward"])) + await channel.send(embed=self.create_answer_embed(f"Find the word from: {shaken_word}", word["word"], word["reward"])) def shake_word(self, word):