Merge pull request #31 from victormylle/master

Changed quiz interval
This commit is contained in:
victormylle
2020-11-14 13:33:14 +01:00
committed by GitHub

View File

@@ -78,19 +78,28 @@ class QuizQuestions(commands.Cog):
class Quiz(commands.Cog):
def __init__(self, client):
self.client = client
self.interval = (5, 10)
self.interval = (8*60, 30*60)
#self.interval = (5, 10)
self.interval = (5*60, 20*60)
self.auto = False
self.timeout = 60*10
@commands.command(name="quiz")
@commands.group(name="questions",case_insensitive=True, invoke_without_command=True)
@commands.check(checks.isModPlus)
async def quiz_bot(self, ctx, f, *args):
if (f == "auto" and not self.auto):
self.auto = True
asyncio.create_task(self.start_auto_quiz())
elif (f == "stop" and self.auto):
self.auto = False
pass
@quiz.command(name="auto")
@commands.check(checks.isModPlus)
async def auto_quiz(self, ctx):
self.auto = True
asyncio.create_task(self.start_auto_quiz())
@quiz.command(name="stop")
@commands.check(checks.isModPlus)
async def auto_quiz(self, ctx):
self.auto = False
async def start_auto_quiz(self):
while self.auto: