diff --git a/index.js b/index.js index 6e81f7b..526f8ad 100644 --- a/index.js +++ b/index.js @@ -64,16 +64,16 @@ const commands = [ client.on('interactionCreate', async interaction => { if (!interaction.isChatInputCommand()) return; + // WAJIB: Defer Reply di baris pertama agar Discord menunggu (antisipasi "application did not respond") + await interaction.deferReply(); + const { commandName } = interaction; const voiceChannel = interaction.member.voice.channel; if (!voiceChannel) { - return interaction.reply({ content: 'Kamu harus berada di Voice Channel untuk menggunakan perintah ini!', ephemeral: true }); + return interaction.editReply({ content: 'Kamu harus berada di Voice Channel untuk menggunakan perintah ini!', ephemeral: true }); } - // Anti-Stuck: Defer Reply - await interaction.deferReply(); - try { if (commandName === 'play') { const query = interaction.options.getString('query');