client.getChannel() only returning a response twice

i am using the discord-rpc node module, i have this function that is executed 5 times but the "then" part of the client.getChannel only gets executed two times
function addVC(ws, channel){
console.log(Object.values(channel)[0])
client.getChannel(Object.values(channel)[0]).then((answer) => {
console.log(answer.name);
});
}
function addVC(ws, channel){
console.log(Object.values(channel)[0])
client.getChannel(Object.values(channel)[0]).then((answer) => {
console.log(answer.name);
});
}
the console output is this 1028614445120888943 1028614495041490954 1071293614732345415 1028614471121387570 921994931407568966 General 1 General 2
1 Reply
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Want results from more Discord servers?
Add your server