错误:
TypeError: Cannot read property 'send' of undefined
let generalChannel = client.channels.cache.get("739065709132382261")
generalChannel.send("Hello!")
我该如何解决?
答案 0 :(得分:0)
client.channels.cache.get
需要使用频道名称指定。因此,请尝试使用let generalChannel = client.channel.cache.get("ID")
let generalChannel = client.channels.cache.find(channel => channel.name === "Name of the channel")