mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 20:28:55 -05:00
Added bitness error checking for opus
This commit is contained in:
parent
77d3056da2
commit
72fa9c2166
@ -23,7 +23,9 @@ except:
|
|||||||
try:
|
try:
|
||||||
if not discord.opus.is_loaded():
|
if not discord.opus.is_loaded():
|
||||||
discord.opus.load_opus('libopus-0.dll')
|
discord.opus.load_opus('libopus-0.dll')
|
||||||
except:
|
except OSError: # Incorrect bitness
|
||||||
|
opus = False
|
||||||
|
except: # Missing opus
|
||||||
opus = None
|
opus = None
|
||||||
else:
|
else:
|
||||||
opus = True
|
opus = True
|
||||||
@ -791,7 +793,10 @@ def setup(bot):
|
|||||||
if youtube_dl is None:
|
if youtube_dl is None:
|
||||||
raise RuntimeError("You need to run `pip3 install youtube_dl`")
|
raise RuntimeError("You need to run `pip3 install youtube_dl`")
|
||||||
return
|
return
|
||||||
if opus is None:
|
if opus is False:
|
||||||
|
raise RuntimeError("Your opus library's bitness must match your python installation's bitness. They both must be either 32bit or 64bit.")
|
||||||
|
return
|
||||||
|
elif opus is None:
|
||||||
raise RuntimeError("You need to install ffmpeg and opus. See \"https://github.com/Twentysix26/Red-DiscordBot/wiki/Requirements\"")
|
raise RuntimeError("You need to install ffmpeg and opus. See \"https://github.com/Twentysix26/Red-DiscordBot/wiki/Requirements\"")
|
||||||
return
|
return
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user