diff --git a/bot.log b/bot.log index 1b10042..151b093 100644 --- a/bot.log +++ b/bot.log @@ -1,20 +1,15 @@ -[dotenv@17.3.1] injecting env (2) from .env -- tip: 🛠️ run anywhere with `dotenvx run -- yourcommand` -/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:1288 - if (invalidKey) throw new DisTubeError("INVALID_KEY", sourceName, invalidKey); - ^ - -DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions - at checkInvalidKey (/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:1288:25) - at new Options (/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:1692:5) - at new DisTube (/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:2281:20) - at Object. (/home/ubuntu/executor/workspace/index.js:25:17) - at Module._compile (node:internal/modules/cjs/loader:1688:14) - at Object..js (node:internal/modules/cjs/loader:1820:10) - at Module.load (node:internal/modules/cjs/loader:1423:32) - at Function._load (node:internal/modules/cjs/loader:1246:12) - at TracingChannel.traceSync (node:diagnostics_channel:322:14) - at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) { - errorCode: 'INVALID_KEY' +[dotenv@17.3.1] injecting env (2) from .env -- tip: 🔐 encrypt with Dotenvx: https://dotenvx.com +Keep-Alive aktif di port 8080 +Bot logged in as XiaoMao#2565 +Memulai refresh slash commands... +(node:11444) DeprecationWarning: The ready event has been renamed to clientReady to distinguish it from the gateway READY event and will only emit under that name in v15. Please use clientReady instead. +(Use `node --trace-deprecation ...` to show where the warning was created) +Berhasil mendaftarkan slash commands! +DisTubeError [FFMPEG_NOT_INSTALLED]: ffmpeg is not installed at 'ffmpeg' path + at checkFFmpeg (/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:1786:11) + at QueueManager.create (/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:2008:7) + at process.processTicksAndRejections (node:internal/process/task_queues:105:5) + at async DisTube.play (/home/ubuntu/executor/workspace/node_modules/distube/dist/index.js:2328:50) + at async Client. (/home/ubuntu/executor/workspace/index.js:78:13) { + errorCode: 'FFMPEG_NOT_INSTALLED' } - -Node.js v22.18.0 diff --git a/index.js b/index.js index 4fddcf3..6e81f7b 100644 --- a/index.js +++ b/index.js @@ -5,6 +5,7 @@ const { YouTubePlugin } = require('@distube/youtube'); const express = require('express'); const ffmpeg = require('ffmpeg-static'); require('dotenv').config(); +console.log('FFmpeg Path: ', ffmpeg); // 1. Keep-Alive System const app = express(); @@ -23,6 +24,7 @@ const client = new Client({ // 3. DisTube Setup const distube = new DisTube(client, { + ffmpegPath: ffmpeg, emitNewSongOnly: true, emitAddSongWhenCreatingQueue: false, emitAddListWhenCreatingQueue: false, diff --git a/package-lock.json b/package-lock.json index da3a79e..40330dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,8 @@ "ffmpeg-static": "^5.3.0", "is-ci": "^4.1.0", "libsodium-wrappers": "^0.8.2", - "opusscript": "^0.0.8" + "opusscript": "^0.0.8", + "play-dl": "^1.9.7" } }, "node_modules/@derhuerst/http-basic": { @@ -1422,6 +1423,24 @@ "url": "https://opencollective.com/express" } }, + "node_modules/play-audio": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz", + "integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==", + "license": "GPL-3.0" + }, + "node_modules/play-dl": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.7.tgz", + "integrity": "sha512-KpgerWxUCY4s9Mhze2qdqPhiqd8Ve6HufpH9mBH3FN+vux55qSh6WJKDabfie8IBHN7lnrAlYcT/UdGax58c2A==", + "license": "GPL-3.0", + "dependencies": { + "play-audio": "^0.5.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/prism-media": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.5.tgz", diff --git a/package.json b/package.json index e5a9f24..1590f8a 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "ffmpeg-static": "^5.3.0", "is-ci": "^4.1.0", "libsodium-wrappers": "^0.8.2", - "opusscript": "^0.0.8" + "opusscript": "^0.0.8", + "play-dl": "^1.9.7" } }