This commit is contained in:
Flatlogic Bot 2026-02-16 16:25:35 +00:00
parent 2c48546b22
commit 989cc90797
3 changed files with 19 additions and 18 deletions

16
bot.log
View File

@ -2,15 +2,13 @@ Interaction Error: DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/ubuntu/executor/workspace/node_modules/@discordjs/rest/dist/index.js:762:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async BurstHandler.runRequest (/home/ubuntu/executor/workspace/node_modules/@discordjs/rest/dist/index.js:866:23)
at async _REST.request (/home/ubuntu/executor/workspace/node_modules/@discordjs/rest/dist/index.js:1307:22)
at async ChatInputCommandInteraction.reply (/home/ubuntu/executor/workspace/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:193:22)
at async Client.<anonymous> (/home/ubuntu/executor/workspace/index.js:68:13) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1472990887029248135/aW50ZXJhY3Rpb246MTQ3Mjk5MDg4NzAyOTI0ODEzNTp2V1dQTFpXN3IybjBtYmZNcjJxaW5qZnlBR1RQdVpKelhnYjdiRUtWQmI1YW9IbXpZS25WVzQzVVpEWVpSa2hVY3FlamhRYVdlaEt0dVlYRVI5bUNCMVM3bnNmUjZhbDBqZk1RdEhrYXB5R3p6VWZsbUNwQUl6RURGa3hkWEwzaw/callback?with_response=false'
at async _REST.request (/home/ubuntu/execVoice Connection Error: Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize
at chooseEncryptionMode (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:529:11)
at /home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:721:21
Voice Connection Error: Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize
at chooseEncryptionMode (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:529:11)
at /home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:721:21
3FlamhRYVdlaEt0dVlYRVI5bUNCMVM3bnNmUjZhbDBqZk1RdEhrYXB5R3p6VWZsbUNwQUl6RURGa3hkWEwzaw/callback?with_response=false'
}
(node:7629) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
(Use `node --trace-warnings ...` to show where the warning was created)

View File

@ -1,10 +1,7 @@
{
"discord_token": "MTQ3MTkwOTE5Mzg4Njg1OTI5NA.GCEdpc.jMIxPFsquVAhp88x3dO-yWUFI7e1u1r8oIZTcw",
"guild_id": "1428530728706117632",
"voice_channel_id": "1457687430189682781",
"alarm_time": "23:20",
"last_voice_channel": {
"guildId": "1428530728706117632",
"channelId": "1457687430189682781"
}
"discord_token": "MTQ3MTkwOTE5Mzg4Njg1OTI5NA.GCEdpc.jMIxPFsquVAhp88x3dO-yWUFI7e1u1r8oIZTcw",
"guild_id": "1428530728706117632",
"voice_channel_id": "1457687430189682781",
"alarm_time": "23:27",
"last_voice_channel": null
}

View File

@ -33,6 +33,10 @@ const client = new Client({
const player = createAudioPlayer();
player.on(AudioPlayerStatus.Idle, () => {
console.log('Audio finished playing. Bot will stay in the channel.');
});
player.on('error', error => {
console.error('Audio Player Error:', error.message);
});
@ -83,6 +87,7 @@ function joinVC(gId, cId) {
guildId: gId,
adapterCreator: guild.voiceAdapterCreator,
selfDeaf: false,
selfMute: false,
});
connection.on(VoiceConnectionStatus.Disconnected, async () => {
@ -130,7 +135,8 @@ client.on('interactionCreate', async interaction => {
return interaction.reply(`File audio tidak ditemukan: ${audioPath}`);
}
const resource = createAudioResource(audioPath);
const resource = createAudioResource(audioPath, { inlineVolume: true });
resource.volume.setVolume(1.0);
player.play(resource);
await interaction.reply('🔊 Memutar audio Sahur!');