fixed quiz issue

This commit is contained in:
2020-11-17 01:17:28 +01:00
parent 557d253fda
commit 6d09095809

View File

@@ -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):