如何获取运行Discord bot命令的通道的通道ID?

时间:2020-07-31 07:00:23

标签: javascript discord.js

每当有人运行命令时,如何存储他在其中运行命令的通道的ID? 〜谢谢!

1 个答案:

答案 0 :(得分:0)

client.on("message", message => {
    console.log(`A message from ${message.author.tag} was sent in the channel with the ID: ${message.channel.id}.`);
});