Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have the Discord Bot link another Channel

I have a Discord bot and I want it to direct someone to a different channel if they use the trigger word(s). I know I'm probably missing a line or two of code to do it.

bot.on("message", message => {
    if(message.content.toLowerCase().indexOf('lists') > -1) {
        message.channel.send(`Please visit #bt-updates for information on the current list information!`);
    }
});
like image 977
jordb22 Avatar asked Oct 16 '25 13:10

jordb22


1 Answers

Based on your response to HolyDragon, it seems you're looking for how to give the "blue link" for the channel in your response?

If so, you need the channel id for #bt-updates, and to return it as

bot.on("message", message => {
  if(message.content.toLowerCase() === 'lists') {
    message.channel.send(`Please visit <#${id}> for information on the current list information!`);
  }
});
like image 80
Melmsie Avatar answered Oct 19 '25 04:10

Melmsie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!