I’m currently developing a Discord bot and need assistance with tracking messages. I have a webhook set up that alerts about new sales in a private channel meant for admins. Additionally, I created a bot that posts celebratory embeds when a specific command is used. However, I would prefer this process to be automatic rather than requiring manual intervention.
Here’s my current code:
bot.on('messageCreate', msg => {
if (msg.content === '!celebrate') {
msg.delete();
const celebrationEmbed = new EmbedBuilder()
.setColor(0xFF6600)
.setImage('https://example-image-url.com')
.setDescription("*We just got a new customer for our premium plan!*\n\n**Don't miss out! Check <#pricing-info-channel> for details!**")
.setTitle('🎉 SUCCESS NOTIFICATION! 🎉');
msg.channel.send({ embeds: [celebrationEmbed] });
}
});
What I need help with is tracking the private admin channel for incoming webhook messages. Once a message is received, I want the bot to automatically send the celebration embed to our public channel. Can anyone guide me on how to do this using the specific channel ID?