rn 如果你执行命令,它会创建一个频道,你可以给机器人发短信。我需要补充一点,工作人员可以从创建的频道给机器人发短信。感谢帮助!
run(client, message, args) {
message.guild.channels
.create(this.name, { type: 'text', })
.then((channel) => {
const catogaryID = '850020908596592713'
channel.setParent(catogaryID)
client.modmailThreads.set(message.author.id, channel.id);
})
message.author.send(`whats wrong ?`)
client.on("message", message => {
if (message.channel.type == "dm" && client.modmailThreads.get(message.author.id)) {
client.channels.cache.get(client.modmailThreads
.get(message.author.id)).send(message.content);
}
});
}