Fixed some issues before release

This commit is contained in:
2020-11-14 00:16:52 +01:00
parent 1bc5d748b7
commit d6b0755038
4 changed files with 102 additions and 99 deletions

View File

@@ -78,9 +78,10 @@ class QuizQuestions(commands.Cog):
class Quiz(commands.Cog):
def __init__(self, client):
self.client = client
#self.interval = (5, 10)
self.interval = (5, 10)
self.interval = (8*60, 30*60)
self.auto = False
self.timeout = 60*10
@commands.command(name="quiz")
@commands.check(checks.isModPlus)
@@ -115,12 +116,18 @@ class Quiz(commands.Cog):
embed.add_field(name="Question:", value=f"{question[1]}", inline=False)
embed.add_field(name="Reward:", value=f"${question[3]} in game", inline=False)
embed.add_field(name="End:", value=f"The quiz will end in 10 minutes!", inline=False)
await channel.send(embed=embed)
embed = discord.Embed()
embed.colour = discord.Colour.orange()
embed.add_field(name="Question:", value=f"{question[1]}", inline=False)
embed.add_field(name="Reward:", value=f"${question[3]} in game", inline=False)
embed.add_field(name="Answer:", value=f"{question[2]}", inline=False)
try:
message = await self.client.wait_for("message", check=lambda message: message.content.lower() == question[2].lower(), timeout=60*10)
message = await self.client.wait_for("message", check=lambda message: message.content.lower() == question[2].lower(), timeout=self.timeout)
self.give_reward(message.author.id, question[3])
playerdblinker = PlayerDBLinker()