modified: Dockerfile
modified: app.py
This commit is contained in:
@@ -4,7 +4,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libnacl-dev \
|
libsodium23 \
|
||||||
libopus0 \
|
libopus0 \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
python3-dev \
|
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'Bot ID: {bot.user.id}')
|
||||||
print(f'Discord.py Version: {discord.__version__}')
|
print(f'Discord.py Version: {discord.__version__}')
|
||||||
print('------')
|
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
|
# Initialize database
|
||||||
await init_database()
|
await init_database()
|
||||||
@@ -1395,7 +1410,7 @@ class GuildMusic:
|
|||||||
raise commands.CommandError("You must be in a voice channel to use this.")
|
raise commands.CommandError("You must be in a voice channel to use this.")
|
||||||
channel = ctx.author.voice.channel
|
channel = ctx.author.voice.channel
|
||||||
if self.voice is None or not self.voice.is_connected():
|
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:
|
else:
|
||||||
if self.voice.channel != channel:
|
if self.voice.channel != channel:
|
||||||
await self.voice.move_to(channel)
|
await self.voice.move_to(channel)
|
||||||
|
|||||||
Reference in New Issue
Block a user