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")
|
logger.info("playing Player on the voice client")
|
||||||
self.h += [self.track]
|
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(
|
ctx.voice_client.play(
|
||||||
player,
|
player,
|
||||||
after=lambda e: self.after(ctx)
|
after=lambda e: self.after(ctx)
|
||||||
|
@ -528,11 +533,6 @@ class Music(Cog):
|
||||||
# Ensure we are connected to voice
|
# Ensure we are connected to voice
|
||||||
if not ctx.voice_client:
|
if not ctx.voice_client:
|
||||||
logger.warning("no 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:
|
if ctx.author.voice:
|
||||||
logger.info(f"moving voice client to {ctx.author.voice.channel}")
|
logger.info(f"moving voice client to {ctx.author.voice.channel}")
|
||||||
await ctx.author.voice.channel.connect()
|
await ctx.author.voice.channel.connect()
|
||||||
|
|
Loading…
Reference in a new issue