|
|
@ -12,13 +12,13 @@ log = logging.getLogger("red.fox_v3.audiotrivia.audiosession")
|
|
|
|
class AudioSession(TriviaSession):
|
|
|
|
class AudioSession(TriviaSession):
|
|
|
|
"""Class to run a session of audio trivia"""
|
|
|
|
"""Class to run a session of audio trivia"""
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, ctx, question_list: dict, settings: dict, audio = None):
|
|
|
|
def __init__(self, ctx, question_list: dict, settings: dict, audio=None):
|
|
|
|
super().__init__(ctx, question_list, settings)
|
|
|
|
super().__init__(ctx, question_list, settings)
|
|
|
|
|
|
|
|
|
|
|
|
self.audio = audio
|
|
|
|
self.audio = audio
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@classmethod
|
|
|
|
def start(cls, ctx, question_list, settings, audio = None):
|
|
|
|
def start(cls, ctx, question_list, settings, audio=None):
|
|
|
|
session = cls(ctx, question_list, settings, audio)
|
|
|
|
session = cls(ctx, question_list, settings, audio)
|
|
|
|
loop = ctx.bot.loop
|
|
|
|
loop = ctx.bot.loop
|
|
|
|
session._task = loop.create_task(session.run())
|
|
|
|
session._task = loop.create_task(session.run())
|
|
|
|