V11
This commit is contained in:
parent
8ba50eb543
commit
eb07bb3e67
152
bot/bot.log
152
bot/bot.log
@ -660,3 +660,155 @@ Playing: https://www.youtube.com/watch?v=vHeO-9G5rxo
|
||||
Play Error: ffmpeg is not installed at 'ffmpeg' path
|
||||
[2026-02-16T09:08:35.195Z] Playing local file independently: /home/ubuntu/executor/workspace/bot/assets/audio/sahur.mp3
|
||||
Playing local file independently: /home/ubuntu/executor/workspace/bot/assets/audio/sahur.mp3
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: ⚙️ write to custom object with { processEnv: myObject }
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: ⚙️ enable debug logging with { debug: true }
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: 🔐 prevent building .env in docker: https://dotenvx.com/prebuild
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: 🔐 prevent building .env in docker: https://dotenvx.com/prebuild
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: ⚙️ suppress all logs with { quiet: true }
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: 🔐 prevent committing .env to code: https://dotenvx.com/precommit
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: ⚙️ write to custom object with { processEnv: myObject }
|
||||
DisTubeError [INVALID_KEY]: 'ffmpegPath' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:41: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
/home/ubuntu/executor/workspace/bot/index.js:23
|
||||
const path = require('path');
|
||||
^
|
||||
|
||||
SyntaxError: Identifier 'path' has already been declared
|
||||
at wrapSafe (node:internal/modules/cjs/loader:1620:18)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1662:20)
|
||||
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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
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)
|
||||
/home/ubuntu/executor/workspace/bot/index.js:23
|
||||
const path = require('path');
|
||||
^
|
||||
|
||||
SyntaxError: Identifier 'path' has already been declared
|
||||
at wrapSafe (node:internal/modules/cjs/loader:1620:18)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1662:20)
|
||||
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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
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)
|
||||
[dotenv@17.3.1] injecting env (4) from .env -- tip: ⚡️ secrets for agents: https://dotenvx.com/as2
|
||||
DisTubeError [INVALID_KEY]: 'searchSongs' does not need to be provided in DisTubeOptions
|
||||
at checkInvalidKey (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1288:25)
|
||||
at new Options (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:1692:5)
|
||||
at new DisTube (/home/ubuntu/executor/workspace/bot/node_modules/distube/dist/index.js:2281:20)
|
||||
at Object.<anonymous> (/home/ubuntu/executor/workspace/bot/index.js:48: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 Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
|
||||
at Module._compile (node:internal/modules/cjs/loader:1688:14) {
|
||||
errorCode: 'INVALID_KEY'
|
||||
}
|
||||
[2026-02-16T09:12:28.825Z] Encryption library (libsodium) is ready.
|
||||
[2026-02-16T09:12:31.821Z] Bot berhasil login!
|
||||
[2026-02-16T09:12:31.824Z] Ready! Logged in as AsepXiaoQin#6954
|
||||
[2026-02-16T09:12:32.048Z] FFMPEG Path: /home/ubuntu/executor/workspace/bot/node_modules/ffmpeg-static/ffmpeg
|
||||
[2026-02-16T09:12:33.315Z] Alarm scheduled at 30 3 * * *
|
||||
[2026-02-16T09:12:51.302Z] Encryption library (libsodium) is ready.
|
||||
[2026-02-16T09:12:52.841Z] Bot berhasil login!
|
||||
[2026-02-16T09:12:52.842Z] Ready! Logged in as AsepXiaoQin#6954
|
||||
[2026-02-16T09:12:52.845Z] FFMPEG Path: /home/ubuntu/executor/workspace/bot/node_modules/ffmpeg-static/ffmpeg
|
||||
[2026-02-16T09:12:53.302Z] Alarm scheduled at 30 3 * * *
|
||||
|
||||
11
bot/index.js
11
bot/index.js
@ -1,4 +1,12 @@
|
||||
process.env.FFMPEG_PATH = require('ffmpeg-static');
|
||||
const ffmpeg = require('ffmpeg-static');
|
||||
const path = require('path');
|
||||
process.env.FFMPEG_PATH = ffmpeg;
|
||||
if (ffmpeg) {
|
||||
const ffmpegDir = path.dirname(ffmpeg);
|
||||
if (!process.env.PATH.includes(ffmpegDir)) {
|
||||
process.env.PATH = `${ffmpegDir}${path.delimiter}${process.env.PATH}`;
|
||||
}
|
||||
}
|
||||
const { Client, GatewayIntentBits, Events, EmbedBuilder, PermissionsBitField } = require('discord.js');
|
||||
const { DisTube } = require('distube');
|
||||
const { SoundCloudPlugin } = require('@distube/soundcloud');
|
||||
@ -12,7 +20,6 @@ const {
|
||||
StreamType
|
||||
} = require('@discordjs/voice');
|
||||
const { CronJob } = require('cron');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// Load environment variables
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user