【发布时间】:2021-01-13 16:25:25
【问题描述】:
我的 join.js 代码如下:- 我希望机器人在加入任何语音频道时自动自聋。
module.exports = {
name: "join",
description: "Joins your voice channel",
category: "music",
execute(message, args) {
if (message.member.voice.channel) {
message.member.voice.channel.join().then((connections) => {
message.channel.send({
embed: {
color: message.client.messageEmbedData.color,
author: {
name: "✔️ Hey, i joined your voice channel",
},
timestamp: new Date(),
},
});
});
} else {
message.channel.send({
embed: {
color: message.client.messageEmbedData.color,
author: {
name: "❗ You are not in a voice channel",
},
timestamp: new Date(),
},
});
}
},
};
我尝试了很多方法,但无法实现 .setSelfDeaf(true) 。
有人帮忙吗?
【问题讨论】:
标签: javascript node.js discord discord.js bots