Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I "Link" a channel like a mention in my Discord Bot message?

I'd like our Discord Bot to mention a specific channel, and let it be clickable. I understand mentioning a user you use the user ID. I do have the channel Id, just unsure how to implement it.

like image 504
artvandelay Avatar asked Mar 21 '19 14:03

artvandelay


People also ask

How do I link a channel to another channel on Discord?

In Discord: there is channel mention. Try that way, do message.channel.mention instead of message.channel.name it should able to link a channel in PM or everywhere. Thanks for contributing an answer to Stack Overflow!

How do you tag a channel in a DM on Discord?

with Developer Mode enabled you’ll now have some additional options available within your Discord client. Right click the channel you wish to tag in your DM, and select Copy ID. Doing this will convert into the server channel which the other person will be able to press on. What’s important to note here is that in order to receive th

Can I have two voice channels on Discord?

Agreed, each voice channel should also double up as a text channel as well, as having to join one voice channel and then open a separate text channel can get frustrating. TteamSpeak and mumble both support dual channel modes (vocal and textual) it's about time discord does as well!

How to create a discord invite link?

In this article, we’ll teach you how you can create a Discord invite link, and how to edit invite link settings. To create an invite link to a server, click on the down arrow beside the server name. On the menu, choose Invite People.


1 Answers

You just have to do the following:

message.channel.send('Please take a look at this Discord Server channel <#CHANNELID>')

or if you get the channel id from the bot

const channel = message.guild.channels.find(channel => channel.name === 'Name of the channel');
message.channel.send(`Please take a look at this Discord Server channel <#${channel.id}>`)

Then the channel is clickable like in this screenshot:

Overview how a clickable channel looks like

like image 169
Gilles Heinesch Avatar answered Sep 25 '22 17:09

Gilles Heinesch