【发布时间】:2020-06-16 20:32:01
【问题描述】:
我正在尝试让机器人从 id 中读取频道名称。但是我应该为此使用正确的代码。
这是我的代码:
client.channels.fetch('670722326664314911')
.then(channel => console.log(channel.name))
.catch(console.error);
错误:TypeError:无法读取 null 的属性“名称”
【问题讨论】:
标签: node.js bots discord discord.js channel