Move opus fix to correct location?
This commit is contained in:
parent
76c933bde1
commit
eade77ffc3
|
@ -451,6 +451,11 @@ class Music(Cog):
|
|||
|
||||
logger.info("playing Player on the voice client")
|
||||
self.h += [self.track]
|
||||
if not discord.opus.is_loaded():
|
||||
try:
|
||||
discord.opus.load_opus("/usr/lib/libopus.so")
|
||||
except:
|
||||
logger.error("opus could not be loaded!")
|
||||
ctx.voice_client.play(
|
||||
player,
|
||||
after=lambda e: self.after(ctx)
|
||||
|
@ -528,11 +533,6 @@ class Music(Cog):
|
|||
# Ensure we are connected to voice
|
||||
if not ctx.voice_client:
|
||||
logger.warning("no voice client")
|
||||
if not discord.opus.is_loaded():
|
||||
try:
|
||||
discord.opus.load_opus("/usr/lib/libopus.so")
|
||||
except:
|
||||
logger.error("opus could not be loaded!")
|
||||
if ctx.author.voice:
|
||||
logger.info(f"moving voice client to {ctx.author.voice.channel}")
|
||||
await ctx.author.voice.channel.connect()
|
||||
|
|
Loading…
Reference in a new issue