V6
This commit is contained in:
parent
28d4436944
commit
2d98a7e127
8
index.js
8
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');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user