From 25f0766982e1d53966e31eb88c0221f036ee227a Mon Sep 17 00:00:00 2001 From: bobloy Date: Mon, 17 Sep 2018 17:03:17 -0400 Subject: [PATCH] small bug and start of config --- audiotrivia/audiosession.py | 2 +- audiotrivia/audiotrivia.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/audiotrivia/audiosession.py b/audiotrivia/audiosession.py index 20ad3ae..1d28b7a 100644 --- a/audiotrivia/audiosession.py +++ b/audiotrivia/audiosession.py @@ -60,4 +60,4 @@ class AudioSession(TriviaSession): async def end_game(self): await super().end_game() - await self.ctx.invoke(self.player.disconnect) + await self.player.disconnect() diff --git a/audiotrivia/audiotrivia.py b/audiotrivia/audiotrivia.py index c170efa..0649d76 100644 --- a/audiotrivia/audiotrivia.py +++ b/audiotrivia/audiotrivia.py @@ -7,7 +7,7 @@ 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 +from redbot.core import commands, Config from redbot.core.bot import Red from redbot.core.data_manager import cog_data_path from redbot.core.utils import box @@ -25,6 +25,12 @@ class AudioTrivia(Trivia): super().__init__() self.bot = bot self.audio = None + self.audioconf = Config.get_conf(self, identifier=651171001051118411410511810597, force_registration=True) + + self.audioconf.register_guild( + delay=30.0, + repeat=True + ) # Todo: Repeat songs shorter than the delay (csgo sound effects for example) @commands.command() @commands.is_owner()