Volume fix and better use of other cog

flask-develop
bobloy 6 years ago
parent ee3d2d90f1
commit caaa7af722

@ -78,7 +78,7 @@ class AudioTrivia(Trivia):
return return
if self.audio is None: if self.audio is None:
self.audio = self.bot.get_cog("Audio") self.audio: Audio = self.bot.get_cog("Audio")
if self.audio is None: if self.audio is None:
await ctx.send("Audio is not loaded. Load it and try again") await ctx.send("Audio is not loaded. Load it and try again")
@ -90,9 +90,9 @@ class AudioTrivia(Trivia):
await ctx.send("There is already an ongoing trivia session in this channel.") await ctx.send("There is already an ongoing trivia session in this channel.")
return return
if not Audio._player_check(ctx): if not self.audio._player_check(ctx):
try: try:
if not ctx.author.voice.channel.permissions_for(ctx.me).connect or Audio._userlimit( if not ctx.author.voice.channel.permissions_for(ctx.me).connect or self.audio._userlimit(
ctx.author.voice.channel ctx.author.voice.channel
): ):
return await ctx.send("I don't have permission to connect to your channel." return await ctx.send("I don't have permission to connect to your channel."
@ -107,6 +107,8 @@ class AudioTrivia(Trivia):
lavaplayer.store("channel", ctx.channel.id) # What's this for? I dunno lavaplayer.store("channel", ctx.channel.id) # What's this for? I dunno
lavaplayer.store("guild", ctx.guild.id) lavaplayer.store("guild", ctx.guild.id)
await self.audio._data_check(ctx)
if ( if (
not ctx.author.voice or ctx.author.voice.channel != lavaplayer.channel not ctx.author.voice or ctx.author.voice.channel != lavaplayer.channel
): ):

Loading…
Cancel
Save