让 Discord Bot link 另一个频道
Have the Discord Bot link another Channel
我有一个 Discord 机器人,我希望它能在某人使用触发词时将其引导至其他频道。我知道我可能缺少一两行代码来完成它。
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!`);
}
});
尝试使用 ===
而不是 indexOf()
。
bot.on("message", message => {
if(message.content.toLowerCase() === 'lists') {
message.channel.send(`Please visit #bt-updates for information on the current list information!`);
}
});
Ping.
的官方示例
让房间1 = message.channel.guild.channels.find('id', 'ChannelID');
message.channel.send(Please visit ${room1} for information on the current list information!
);
}
根据您对 HolyDragon 的回复,您似乎正在寻找如何在回复中为频道提供 "blue link"?
如果是这样,您需要#bt-updates 的频道 ID,return 将其设为
bot.on("message", message => {
if(message.content.toLowerCase() === 'lists') {
message.channel.send(`Please visit <#${id}> for information on the current list information!`);
}
});
我有一个 Discord 机器人,我希望它能在某人使用触发词时将其引导至其他频道。我知道我可能缺少一两行代码来完成它。
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!`);
}
});
尝试使用 ===
而不是 indexOf()
。
bot.on("message", message => {
if(message.content.toLowerCase() === 'lists') {
message.channel.send(`Please visit #bt-updates for information on the current list information!`);
}
});
Ping.
的官方示例让房间1 = message.channel.guild.channels.find('id', 'ChannelID');
message.channel.send(Please visit ${room1} for information on the current list information!
);
}
根据您对 HolyDragon 的回复,您似乎正在寻找如何在回复中为频道提供 "blue link"?
如果是这样,您需要#bt-updates 的频道 ID,return 将其设为
bot.on("message", message => {
if(message.content.toLowerCase() === 'lists') {
message.channel.send(`Please visit <#${id}> for information on the current list information!`);
}
});