actual starting

pull/23/head
bobloy 6 years ago
parent ed94b7e1cd
commit 20e2d6026f

@ -38,7 +38,10 @@ class AudioSession(TriviaSession):
await self.ctx.send(msg)
print(question)
await self.audio.play(ctx=self.ctx, query=question)
# await self.ctx.invoke(self.audio.play(ctx=self.ctx, query=question))
await self.ctx.invoke(self.audio.play, query=question)
print("after audio.play")
continue_ = await self.wait_for_answer(answers, delay, timeout)
if continue_ is False:
@ -49,3 +52,7 @@ class AudioSession(TriviaSession):
else:
await self.ctx.send("There are no more questions!")
await self.end_game()
async def end_game(self):
await super().end_game()
await self.ctx.invoke(self.audio.disconnect)

@ -2,6 +2,7 @@ import pathlib
from typing import List
import yaml
from redbot.cogs.audio import Audio
from redbot.cogs.trivia import LOG
from redbot.cogs.trivia.trivia import InvalidListError, Trivia
from redbot.core import commands
@ -23,6 +24,13 @@ class AudioTrivia(Trivia):
self.bot = bot
self.audio = None
# @commands.command()
# @commands.is_owner()
# async def testit(self, ctx: commands.Context):
# self.audio: Audio = self.bot.get_cog("Audio")
# await ctx.invoke(self.audio.play, query="https://www.youtube.com/watch?v=FrceWR4XnVU")
# print("done")
@commands.group(invoke_without_command=True)
@commands.guild_only()
async def audiotrivia(self, ctx: commands.Context, *categories: str):

Loading…
Cancel
Save