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