v6
This commit is contained in:
parent
e22abc064b
commit
48fb3678a0
136
bot.log
136
bot.log
@ -17,7 +17,141 @@ Uncaught exception: Error: Cannot utilize the DAVE protocol as the @snazzah/dave
|
||||
at Receiver.receiverOnMessage (/home/ubuntu/executor/workspace/node_modules/ws/lib/websocket.js:1225:20)
|
||||
Bot Status: Playing
|
||||
Bot Status: Playing
|
||||
[Deploy] 2026-02-17 15:56:30
|
||||
Bot Status: Playing
|
||||
Uncaught exception: Error: spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg ENOENT
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
|
||||
at onErrorNT (node:internal/child_process:483:16)
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
|
||||
errno: -2,
|
||||
code: 'ENOENT',
|
||||
syscall: 'spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
path: '/home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
spawnargs: [
|
||||
'-i',
|
||||
'/home/ubuntu/executor/workspace/sahur.mp3',
|
||||
'-analyzeduration',
|
||||
'0',
|
||||
'-loglevel',
|
||||
'0',
|
||||
'-acodec',
|
||||
'libopus',
|
||||
'-f',
|
||||
'opus',
|
||||
'-ar',
|
||||
'48000',
|
||||
'-ac',
|
||||
'2',
|
||||
'pipe:1'
|
||||
]
|
||||
}
|
||||
Uncaught exception: Error: Cannot utilize the DAVE protocol as the @snazzah/davey package has not been installed.
|
||||
- Use the generateDependencyReport() function for more information.
|
||||
|
||||
at new DAVESession (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:746:13)
|
||||
at Networking.createDaveSession (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1467:21)
|
||||
at Networking.onWsPacket (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1602:20)
|
||||
at VoiceWebSocket.emit (node:events:530:35)
|
||||
at VoiceWebSocket.onMessage (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1239:10)
|
||||
at VoiceWebSocket.ws.onmessage (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1182:39)
|
||||
at callListener (/home/ubuntu/executor/workspace/node_modules/ws/lib/event-target.js:290:14)
|
||||
at WebSocket.onMessage (/home/ubuntu/executor/workspace/node_modules/ws/lib/event-target.js:209:9)
|
||||
at WebSocket.emit (node:events:518:28)
|
||||
at Receiver.receiverOnMessage (/home/ubuntu/executor/workspace/node_modules/ws/lib/websocket.js:1225:20)
|
||||
Bot Status: Playing
|
||||
Uncaught exception: Error: spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg ENOENT
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
|
||||
at onErrorNT (node:internal/child_process:483:16)
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
|
||||
errno: -2,
|
||||
code: 'ENOENT',
|
||||
syscall: 'spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
path: '/home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
spawnargs: [
|
||||
'-i',
|
||||
'/home/ubuntu/executor/workspace/sahur.mp3',
|
||||
'-analyzeduration',
|
||||
'0',
|
||||
'-loglevel',
|
||||
'0',
|
||||
'-acodec',
|
||||
'libopus',
|
||||
'-f',
|
||||
'opus',
|
||||
'-ar',
|
||||
'48000',
|
||||
'-ac',
|
||||
'2',
|
||||
'pipe:1'
|
||||
]
|
||||
}
|
||||
Bot Status: Playing
|
||||
Uncaught exception: Error: spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg ENOENT
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
|
||||
at onErrorNT (node:internal/child_process:483:16)
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
|
||||
errno: -2,
|
||||
code: 'ENOENT',
|
||||
syscall: 'spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
path: '/home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
spawnargs: [
|
||||
'-i',
|
||||
'/home/ubuntu/executor/workspace/sahur.mp3',
|
||||
'-analyzeduration',
|
||||
'0',
|
||||
'-loglevel',
|
||||
'0',
|
||||
'-acodec',
|
||||
'libopus',
|
||||
'-f',
|
||||
'opus',
|
||||
'-ar',
|
||||
'48000',
|
||||
'-ac',
|
||||
'2',
|
||||
'pipe:1'
|
||||
]
|
||||
}
|
||||
Uncaught exception: Error: Cannot utilize the DAVE protocol as the @snazzah/davey package has not been installed.
|
||||
- Use the generateDependencyReport() function for more information.
|
||||
|
||||
at new DAVESession (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:746:13)
|
||||
at Networking.createDaveSession (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1467:21)
|
||||
at Networking.onWsPacket (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1602:20)
|
||||
at VoiceWebSocket.emit (node:events:530:35)
|
||||
at VoiceWebSocket.onMessage (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1239:10)
|
||||
at VoiceWebSocket.ws.onmessage (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:1182:39)
|
||||
at callListener (/home/ubuntu/executor/workspace/node_modules/ws/lib/event-target.js:290:14)
|
||||
at WebSocket.onMessage (/home/ubuntu/executor/workspace/node_modules/ws/lib/event-target.js:209:9)
|
||||
at WebSocket.emit (node:events:518:28)
|
||||
at Receiver.receiverOnMessage (/home/ubuntu/executor/workspace/node_modules/ws/lib/websocket.js:1225:20)
|
||||
Bot Status: Playing
|
||||
Uncaught exception: Error: spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg ENOENT
|
||||
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
|
||||
at onErrorNT (node:internal/child_process:483:16)
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
|
||||
errno: -2,
|
||||
code: 'ENOENT',
|
||||
syscall: 'spawn /home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
path: '/home/ubuntu/executor/workspace/node_modules/ffmpeg-static/ffmpeg',
|
||||
spawnargs: [
|
||||
'-i',
|
||||
'/home/ubuntu/executor/workspace/sahur.mp3',
|
||||
'-analyzeduration',
|
||||
'0',
|
||||
'-loglevel',
|
||||
'0',
|
||||
'-acodec',
|
||||
'libopus',
|
||||
'-f',
|
||||
'opus',
|
||||
'-ar',
|
||||
'48000',
|
||||
'-ac',
|
||||
'2',
|
||||
'pipe:1'
|
||||
]
|
||||
}
|
||||
[Deploy] 2026-02-17 16:19:33
|
||||
Started refreshing 2 application (/) commands.
|
||||
Successfully reloaded 2 application (/) commands.
|
||||
|
||||
|
||||
30
index.js
30
index.js
@ -1,19 +1,12 @@
|
||||
const ffmpeg = require('ffmpeg-static');
|
||||
const { generateDependencyReport } = require('@discordjs/voice');
|
||||
console.log(generateDependencyReport());
|
||||
|
||||
// --- ENCRYPTION & AUDIO CONFIG ---
|
||||
// Wajib di baris paling atas agar enkripsi Discord terdeteksi dengan benar
|
||||
require('libsodium-wrappers');
|
||||
const ffmpeg = require('ffmpeg-static');
|
||||
process.env.FFMPEG_PATH = ffmpeg;
|
||||
require('libsodium-wrappers');
|
||||
|
||||
// --- DAVE PROTOCOL FIX ---
|
||||
try {
|
||||
require('@snazzah/davey');
|
||||
} catch (e) {
|
||||
console.warn('Warning: @snazzah/davey not found, but is recommended for DAVE protocol.');
|
||||
}
|
||||
|
||||
const http = require('http');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// --- KEEP ALIVE ---
|
||||
// Membuat server sederhana agar bot merespons ping dari sistem
|
||||
@ -74,18 +67,11 @@ const client = new Client({
|
||||
|
||||
// Helper function to join voice
|
||||
function connectToVoice(interaction) {
|
||||
const member = interaction.member;
|
||||
const voiceChannel = member.voice.channel;
|
||||
|
||||
if (!voiceChannel) {
|
||||
throw new Error('Kamu harus berada di Voice Channel untuk menggunakan perintah ini!');
|
||||
}
|
||||
|
||||
return joinVoiceChannel({
|
||||
channelId: voiceChannel.id,
|
||||
guildId: interaction.guildId,
|
||||
channelId: interaction.member.voice.channel.id,
|
||||
guildId: interaction.guild.id,
|
||||
adapterCreator: interaction.guild.voiceAdapterCreator,
|
||||
selfDeaf: false,
|
||||
selfDeaf: true,
|
||||
selfMute: false,
|
||||
});
|
||||
}
|
||||
|
||||
38
package-lock.json
generated
38
package-lock.json
generated
@ -8,11 +8,11 @@
|
||||
"name": "sahur-alarm-bot",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@discordjs/opus": "^0.9.0",
|
||||
"@discordjs/voice": "^0.19.0",
|
||||
"@discordjs/opus": "0.9.0",
|
||||
"@discordjs/voice": "0.16.1",
|
||||
"@snazzah/davey": "^0.1.9",
|
||||
"discord.js": "^14.14.1",
|
||||
"ffmpeg-static": "^5.3.0",
|
||||
"ffmpeg-static": "5.1.0",
|
||||
"libsodium-wrappers": "^0.8.2",
|
||||
"opusscript": "^0.0.8",
|
||||
"sodium-native": "^5.0.10",
|
||||
@ -146,24 +146,28 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/voice": {
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.19.0.tgz",
|
||||
"integrity": "sha512-UyX6rGEXzVyPzb1yvjHtPfTlnLvB5jX/stAMdiytHhfoydX+98hfympdOwsnTktzr+IRvphxTbdErgYDJkEsvw==",
|
||||
"version": "0.16.1",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.16.1.tgz",
|
||||
"integrity": "sha512-uiWiW0Ta6K473yf8zs13RfKuPqm/xU4m4dAidMkIdwqgy1CztbbZBtPLfDkVSKzpW7s6m072C+uQcs4LwF3FhA==",
|
||||
"deprecated": "This version uses deprecated encryption modes. Please use a newer version.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/ws": "^8.18.1",
|
||||
"discord-api-types": "^0.38.16",
|
||||
"@types/ws": "^8.5.9",
|
||||
"discord-api-types": "0.37.61",
|
||||
"prism-media": "^1.3.5",
|
||||
"tslib": "^2.8.1",
|
||||
"ws": "^8.18.3"
|
||||
"tslib": "^2.6.2",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/discordjs/discord.js?sponsor"
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/voice/node_modules/discord-api-types": {
|
||||
"version": "0.37.61",
|
||||
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz",
|
||||
"integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@discordjs/ws": {
|
||||
"version": "1.2.3",
|
||||
"license": "Apache-2.0",
|
||||
@ -761,9 +765,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ffmpeg-static": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ffmpeg-static/-/ffmpeg-static-5.3.0.tgz",
|
||||
"integrity": "sha512-H+K6sW6TiIX6VGend0KQwthe+kaceeH/luE8dIZyOP35ik7ahYojDuqlTV1bOrtEwl01sy2HFNGQfi5IDJvotg==",
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ffmpeg-static/-/ffmpeg-static-5.1.0.tgz",
|
||||
"integrity": "sha512-eEWOiGdbf7HKPeJI5PoJ0oCwkL0hckL2JdS4JOuB/gUETppwkEpq8nF0+e6VEQnDCo/iuoipbTUsn9QJmtpNkg==",
|
||||
"hasInstallScript": true,
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
"start": "node index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordjs/opus": "^0.9.0",
|
||||
"@discordjs/voice": "^0.19.0",
|
||||
"@discordjs/opus": "0.9.0",
|
||||
"@discordjs/voice": "0.16.1",
|
||||
"@snazzah/davey": "^0.1.9",
|
||||
"discord.js": "^14.14.1",
|
||||
"ffmpeg-static": "^5.3.0",
|
||||
"ffmpeg-static": "5.1.0",
|
||||
"libsodium-wrappers": "^0.8.2",
|
||||
"opusscript": "^0.0.8",
|
||||
"sodium-native": "^5.0.10",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user