我如何获取刚刚在discord.js中创建的语音通道的ID?

时间:2019-10-11 19:55:57

标签: javascript node.js discord discord.js

如何获取刚刚创建的语音通道的ID(如果可能,通过名称)并将其放入变量中?例如:

var channelvoice = ('Name '+count); // name + var
client.channels.get(fun).clone(`${channelvoice}`, true, true, 'Needed a clone') // fun is a name of a channel.
            .then(clone => clone.setParent('629745940953678742'))
            .then(clone => clone.setPosition(1))
            .catch(console.error);
var idvoicechannel = client.channels.get(`${channelvoice}`).id; // <--

0 个答案:

没有答案