refactor(utils): remove opus load warning

This commit is contained in:
Ryan 2025-01-09 16:47:14 -05:00
parent 8cbd7d6aef
commit 23c29e1fa0
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -1,6 +1,6 @@
import os import os
import time import time
from logging import error, info, warning from logging import error, info
import disnake import disnake
@ -129,9 +129,10 @@ def filter_secrets(text: str, secrets=constants.SECRETS) -> str:
def load_opus(): def load_opus():
warning("opus wasn't automatically loaded! trying to load manually...") for path in filter(
for path in ["/usr/lib64/libopus.so.0", "/usr/lib/libopus.so.0"]: lambda p: os.path.exists(p),
if os.path.exists(path): ["/usr/lib64/libopus.so.0", "/usr/lib/libopus.so.0"],
):
try: try:
disnake.opus.load_opus(path) disnake.opus.load_opus(path)
info(f"successfully loaded opus from {path}") info(f"successfully loaded opus from {path}")