modified: Dockerfile
modified: app.py
This commit is contained in:
@@ -4,7 +4,7 @@ WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libffi-dev \
|
||||
libnacl-dev \
|
||||
libsodium23 \
|
||||
libopus0 \
|
||||
ffmpeg \
|
||||
python3-dev \
|
||||
|
||||
17
app.py
17
app.py
@@ -90,6 +90,21 @@ async def on_ready():
|
||||
print(f'Bot ID: {bot.user.id}')
|
||||
print(f'Discord.py Version: {discord.__version__}')
|
||||
print('------')
|
||||
# Voice libs diagnostics
|
||||
try:
|
||||
if not discord.opus.is_loaded():
|
||||
# Common soname on Debian-based distros
|
||||
discord.opus.load_opus('libopus.so.0')
|
||||
print(f"🎧 Opus loaded: {discord.opus.is_loaded()}")
|
||||
except Exception as e:
|
||||
print(f"⚠️ Could not load Opus: {e}")
|
||||
try:
|
||||
import nacl
|
||||
print(f"🔐 PyNaCl available: {getattr(nacl, '__version__', 'unknown')}")
|
||||
except Exception as e:
|
||||
print(f"⚠️ PyNaCl import failed: {e}")
|
||||
cpath = _cookies_path()
|
||||
print(f"🍪 yt-dlp cookies: {'found at ' + cpath if cpath else 'not found'}")
|
||||
|
||||
# Initialize database
|
||||
await init_database()
|
||||
@@ -1395,7 +1410,7 @@ class GuildMusic:
|
||||
raise commands.CommandError("You must be in a voice channel to use this.")
|
||||
channel = ctx.author.voice.channel
|
||||
if self.voice is None or not self.voice.is_connected():
|
||||
self.voice = await channel.connect()
|
||||
self.voice = await channel.connect(timeout=15.0, reconnect=True)
|
||||
else:
|
||||
if self.voice.channel != channel:
|
||||
await self.voice.move_to(channel)
|
||||
|
||||
Reference in New Issue
Block a user