V3
This commit is contained in:
parent
2c48546b22
commit
989cc90797
16
bot.log
16
bot.log
@ -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 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 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 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 _REST.request (/home/ubuntu/execVoice Connection Error: Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize
|
||||||
at async ChatInputCommandInteraction.reply (/home/ubuntu/executor/workspace/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:193:22)
|
at chooseEncryptionMode (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:529:11)
|
||||||
at async Client.<anonymous> (/home/ubuntu/executor/workspace/index.js:68:13) {
|
at /home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:721:21
|
||||||
requestBody: { files: [], json: { type: 4, data: [Object] } },
|
Voice Connection Error: Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize
|
||||||
rawError: { message: 'Unknown interaction', code: 10062 },
|
at chooseEncryptionMode (/home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:529:11)
|
||||||
code: 10062,
|
at /home/ubuntu/executor/workspace/node_modules/@discordjs/voice/dist/index.js:721:21
|
||||||
status: 404,
|
3FlamhRYVdlaEt0dVlYRVI5bUNCMVM3bnNmUjZhbDBqZk1RdEhrYXB5R3p6VWZsbUNwQUl6RURGa3hkWEwzaw/callback?with_response=false'
|
||||||
method: 'POST',
|
|
||||||
url: 'https://discord.com/api/v10/interactions/1472990887029248135/aW50ZXJhY3Rpb246MTQ3Mjk5MDg4NzAyOTI0ODEzNTp2V1dQTFpXN3IybjBtYmZNcjJxaW5qZnlBR1RQdVpKelhnYjdiRUtWQmI1YW9IbXpZS25WVzQzVVpEWVpSa2hVY3FlamhRYVdlaEt0dVlYRVI5bUNCMVM3bnNmUjZhbDBqZk1RdEhrYXB5R3p6VWZsbUNwQUl6RURGa3hkWEwzaw/callback?with_response=false'
|
|
||||||
}
|
}
|
||||||
(node:7629) Warning: Supplying "ephemeral" for interaction response options is deprecated. Utilize flags instead.
|
(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)
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"discord_token": "MTQ3MTkwOTE5Mzg4Njg1OTI5NA.GCEdpc.jMIxPFsquVAhp88x3dO-yWUFI7e1u1r8oIZTcw",
|
"discord_token": "MTQ3MTkwOTE5Mzg4Njg1OTI5NA.GCEdpc.jMIxPFsquVAhp88x3dO-yWUFI7e1u1r8oIZTcw",
|
||||||
"guild_id": "1428530728706117632",
|
"guild_id": "1428530728706117632",
|
||||||
"voice_channel_id": "1457687430189682781",
|
"voice_channel_id": "1457687430189682781",
|
||||||
"alarm_time": "23:20",
|
"alarm_time": "23:27",
|
||||||
"last_voice_channel": {
|
"last_voice_channel": null
|
||||||
"guildId": "1428530728706117632",
|
|
||||||
"channelId": "1457687430189682781"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
8
index.js
8
index.js
@ -33,6 +33,10 @@ const client = new Client({
|
|||||||
|
|
||||||
const player = createAudioPlayer();
|
const player = createAudioPlayer();
|
||||||
|
|
||||||
|
player.on(AudioPlayerStatus.Idle, () => {
|
||||||
|
console.log('Audio finished playing. Bot will stay in the channel.');
|
||||||
|
});
|
||||||
|
|
||||||
player.on('error', error => {
|
player.on('error', error => {
|
||||||
console.error('Audio Player Error:', error.message);
|
console.error('Audio Player Error:', error.message);
|
||||||
});
|
});
|
||||||
@ -83,6 +87,7 @@ function joinVC(gId, cId) {
|
|||||||
guildId: gId,
|
guildId: gId,
|
||||||
adapterCreator: guild.voiceAdapterCreator,
|
adapterCreator: guild.voiceAdapterCreator,
|
||||||
selfDeaf: false,
|
selfDeaf: false,
|
||||||
|
selfMute: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
connection.on(VoiceConnectionStatus.Disconnected, async () => {
|
connection.on(VoiceConnectionStatus.Disconnected, async () => {
|
||||||
@ -130,7 +135,8 @@ client.on('interactionCreate', async interaction => {
|
|||||||
return interaction.reply(`File audio tidak ditemukan: ${audioPath}`);
|
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);
|
player.play(resource);
|
||||||
|
|
||||||
await interaction.reply('🔊 Memutar audio Sahur!');
|
await interaction.reply('🔊 Memutar audio Sahur!');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user