I want to make a Setup Command for my Bot, that I can use to set up channels for the bot e.g. a welcome channel. For this, I used a JSON file.
Code
collector.on('collect', async (i) => {
if (i.customId === 'modchannelbutton') {
const ModChannelSetEmbed = new MessageEmbed()
.setTitle('<:vsl_settings:991655211179442216> | **__SERVER SETUP__**')
.addField(
'» Stand',
setupconfig[interaction.guild.id].modlog === 'nochannel'
? '<:m_notdone:991657968296808478> Du hast noch kein Moderator Log gesetzt'
: `<:m_done:991657855549710376> Dein aktueller Moderator Log ist: <#${
setupconfig[interaction.guild.id].modlog
}>`,
)
.setDescription(
'> Du hast 1 Minute Zeit um einen neuen Moderator Log zu setzen, schreib dafür einfach nur den #Channel in diesem Channel',
)
.setColor('#0c06b6');
row.components[0].setDisabled(true);
await i.update({ embeds: [ModChannelSetEmbed], components: [] });
// … Here I need the Message Collector for the Channel …
}
});
I want to make a collector that collected if the message next to the button is clicked in a channel. But all my tries don't reply.
That means: Slash Command use —> Button Click —> Channel send
The Collector should control if the message next to the button click is a channel.