mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 12:18:54 -05:00
Added bitness error checking for opus
This commit is contained in:
parent
77d3056da2
commit
72fa9c2166
@ -23,7 +23,9 @@ except:
|
||||
try:
|
||||
if not discord.opus.is_loaded():
|
||||
discord.opus.load_opus('libopus-0.dll')
|
||||
except:
|
||||
except OSError: # Incorrect bitness
|
||||
opus = False
|
||||
except: # Missing opus
|
||||
opus = None
|
||||
else:
|
||||
opus = True
|
||||
@ -791,7 +793,10 @@ def setup(bot):
|
||||
if youtube_dl is None:
|
||||
raise RuntimeError("You need to run `pip3 install youtube_dl`")
|
||||
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\"")
|
||||
return
|
||||
loop = asyncio.get_event_loop()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user