Discord bot cannot play radio

14 Views Asked by At

I recently made a bot that can play music. Now I decided to add a new functionality to it and that is playing the radio.

Everything works great on my PC, but as soon as I upload it to the server. The bot connects and immediately disconnects.

I used generateDependencyReport() to generate report. on PC i get:

--------------------------------------------------
Core Dependencies
- @discordjs/voice: [VI]{{inject}}[/VI]
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.0.8

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.11
- tweetnacl: not found

FFmpeg
- version: 6.0-essentials_build-www.gyan.dev
- libopus: yes
--------------------------------------------------

on server i get:

--------------------------------------------------
Core Dependencies
- @discordjs/voice: [VI]{{inject}}[/VI]
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.0.8

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.11
- tweetnacl: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------

my package.json dependencies:

  "dependencies": {
    "@discordjs/voice": "^0.15.0",
    "cron": "^2.1.0",
    "discord.js": "^14.8.0",
    "ffmpeg-static": "^5.2.0",
    "firebase": "^9.12.1",
    "firebase-admin": "^11.2.0",
    "libsodium-wrappers": "^0.7.11",
    "node-fetch": "^2.6.1",
    "opusscript": "^0.0.8",
    "play-dl": "^1.9.6"
  }

and my bot code: here

0

There are 0 best solutions below