art*_*lay 4 discord discord.js
我希望我们的 Discord Bot 提及一个特定的频道,并让它可以点击。我了解提到您使用用户 ID 的用户。我确实有频道 ID,只是不确定如何实现它。
您只需执行以下操作:
message.channel.send('Please take a look at this Discord Server channel <#CHANNELID>')
Run Code Online (Sandbox Code Playgroud)
或者如果您从机器人获得频道 ID
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}>`)
Run Code Online (Sandbox Code Playgroud)
然后频道是可点击的,如下图所示:

| 归档时间: |
|
| 查看次数: |
25291 次 |
| 最近记录: |