yuyaaici_YT
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
ok thanks
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
ok
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
Because I tried to remove that code but the same problem
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
How I can fix it?
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
this is my code
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
because interactionCreate doesn't work
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 7/3/2023 in #djs-questions
Button
but there aren't other ways to fix that?
19 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 3/2/2023 in #djs-questions
Last message BOT
ok thanks
6 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 3/2/2023 in #djs-questions
Last message BOT
an example please?
6 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/30/2022 in #djs-questions
how do I tell the bot that it needs to delete its last message sent
let embed = new Discord.MessageEmbed()
.setTitle("Playing song...")
.addField("Song", ""+song.name+"")
.addField("Duration",
.setThumbnail(song.thumbnail) queue.textChannel.send({ embeds: [embed] }); How can I tell him that he has to delete this message
${minutes}:${seconds}
,true)
.addField("Requested by", song.user.toString(), true).setThumbnail(song.thumbnail) queue.textChannel.send({ embeds: [embed] }); How can I tell him that he has to delete this message
4 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/27/2022 in #djs-questions
Buttons
I tried so but it gives me error
13 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/27/2022 in #djs-questions
Buttons
client.on("messageCreate", message => {
let button1 = new Discord.MessageButton() .setEmoji("❗") .setLabel("Stop!") .setStyle("SECONDARY") .setCustomId(
queue.textChannel.send({ components: [row] });
const collector = interaction.channel?.createMessageComponentCollector({ componentType: ComponentType.Button, }); collector?.on('collect', async (...args) => { const interaction = [...args][0]; await mainMenuHandler(interaction, collector); });
if (interaction.customId.startsWith("buttonstop")) { interaction.deferUpdate();
const voiceChannel = interaction.member.voice.channel; if (!voiceChannel) { return interaction.reply("You must be in a voice channel to run this command"); }
const voiceChannelBot = interaction.guild.channels.cache.find(channel => channel.type == "GUILD_VOICE" && channel.members.has(client.user.id)); if (voiceChannelBot && voiceChannel.id !== voiceChannelBot.id) { return interaction.reply("This bot is already in use in another voice chat"); } try { distube.stop(interaction);
} catch { return interaction.reply("No songs playing or songs already paused"); }
interaction.channel.send("Bye");
} })
let button1 = new Discord.MessageButton() .setEmoji("❗") .setLabel("Stop!") .setStyle("SECONDARY") .setCustomId(
buttonstop,${song.user.id}
);
let row = new Discord.MessageActionRow()
.addComponents(button1);
queue.textChannel.send({ components: [row] });
const collector = interaction.channel?.createMessageComponentCollector({ componentType: ComponentType.Button, }); collector?.on('collect', async (...args) => { const interaction = [...args][0]; await mainMenuHandler(interaction, collector); });
if (interaction.customId.startsWith("buttonstop")) { interaction.deferUpdate();
const voiceChannel = interaction.member.voice.channel; if (!voiceChannel) { return interaction.reply("You must be in a voice channel to run this command"); }
const voiceChannelBot = interaction.guild.channels.cache.find(channel => channel.type == "GUILD_VOICE" && channel.members.has(client.user.id)); if (voiceChannelBot && voiceChannel.id !== voiceChannelBot.id) { return interaction.reply("This bot is already in use in another voice chat"); } try { distube.stop(interaction);
} catch { return interaction.reply("No songs playing or songs already paused"); }
interaction.channel.send("Bye");
} })
13 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/27/2022 in #djs-questions
Buttons
const eventHandlers = {
playSong: (queue, song) => {
let embed = new Discord.MessageEmbed()
.setTitle("Playing song...")
.addField("Song", song.name)
.addField("Requested by", song.user.toString());
queue.textChannel.send({ embeds: [embed] });
songCount += 1;
console.log(
}, interactionCreate: interaction => { if (!interaction.isButton()) return; if (interaction.customId.startsWith("buttonstop")) { if (!interaction.isButton()) return; if (interaction.customId.startsWith("buttonstop")) { interaction.deferUpdate(); const voiceChannel = interaction.member.voice.channel; if (!voiceChannel) { return interaction.reply("You must be in a voice channel to execute this command"); } const voiceChannelBot = interaction.guild.channels.cache.find(channel => channel.type == "GUILD_VOICE" && channel.members.has(client.user.id)); if (voiceChannelBot && voiceChannel.id !== voiceChannelBot.id) { return interaction.reply("This bot is already in use in another voice chat"); }
try { distube.stop(interaction); } catch { return interaction.reply("No songs playing or songs already stopped"); } interaction.channel.send("Bye"); }
}; } }
songCount = ${songCount}
);
let button1 = new Discord.MessageButton()
.setEmoji("❗")
.setLabel("Stop!")
.setStyle("SECONDARY")
.setCustomId(buttonstop,${song.user.id}
);
let row = new Discord.MessageActionRow()
.addComponents(button1);
currentInteraction = queue.textChannel.send({ components: [row] });
}, interactionCreate: interaction => { if (!interaction.isButton()) return; if (interaction.customId.startsWith("buttonstop")) { if (!interaction.isButton()) return; if (interaction.customId.startsWith("buttonstop")) { interaction.deferUpdate(); const voiceChannel = interaction.member.voice.channel; if (!voiceChannel) { return interaction.reply("You must be in a voice channel to execute this command"); } const voiceChannelBot = interaction.guild.channels.cache.find(channel => channel.type == "GUILD_VOICE" && channel.members.has(client.user.id)); if (voiceChannelBot && voiceChannel.id !== voiceChannelBot.id) { return interaction.reply("This bot is already in use in another voice chat"); }
try { distube.stop(interaction); } catch { return interaction.reply("No songs playing or songs already stopped"); } interaction.channel.send("Bye"); }
}; } }
13 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/27/2022 in #djs-questions
Buttons
I did so but it doesn't work:
13 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/27/2022 in #djs-questions
Buttons
And how should I do it
13 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/25/2022 in #djs-questions
button spam
A ok thanks
18 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/25/2022 in #djs-questions
button spam
because I have to do that when the word -play part below appears a button
18 replies
DIAdiscord.js - Imagine an app
•Created by yuyaaici_YT on 12/25/2022 in #djs-questions
button spam
You can repeat I did not understand
18 replies