当我在不协调通道中发送消息时,它也会被发送到不同的通道,我该如何创建机器人程序?节省时间,而不是复制和粘贴
您可以使用:
message.channel.send(message)
message.client.channels.cache.get('<Put the channel ID here>').send(message)
所以你想要一个自动将你发送的消息发送到另一个频道的机器人吗?
bot.on("message", message => {
if (message.author.id === "YOUR ID HERE") {
message.client.channels.cache.get('<Put the channel ID here>').send(message.content)
}
});