You need to send a GuildChannel
for the channel name to be clickable.
You can achieve this by finding the channel in guild.channels.cache
This returns a Collection, which you can filter.
If you have an ID (easier):
var message = "Make sure to check the rules at " +
message.guild.channels.cache.get('channelID').toString();
If you want find the channel by ID (might break if you have multiple channels with the same name):
var message = "Make sure to check the rules at " +
message.guild.channels.find(channel => channel.name === "rules").toString();
EDIT:
Much easier way: in Discord mention the channel and put a
(backslash) before the channel name #rules
. You'll get something like <#channelID>
.
Use that like this: var message = "Make sure to check the rules at <#channelID>";
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…