Voice channel status

Hey, i would like to know if there are any new infos regarding Voice channel status like when it will be implemented in discordjs
4 Replies
d.js toolkit
d.js toolkitโ€ข7mo 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!
WhiteGarfield
WhiteGarfieldโ€ข7mo ago
hmmm ok. ive asked cause it looks like they forgot about it :dogeHaHa: was worth a try if you had any news
WhiteGarfield
WhiteGarfieldโ€ข7mo ago
Hey Qjuh, based on some research and asking in Discord Developers, advaith gave me 2 github pull requests regarding it which includes a api endpoint for voice-status. both pull are the following: https://github.com/discord/discord-api-docs/pull/6398 https://github.com/discord/discord-api-docs/pull/6400 with this i made a little test in js:
require('dotenv').config();
async function updateStatus(channel, musicInfo) {
try {
const response = await fetch(`https://discord.com/api/v9/channels/${channel.id}/voice-status`, {
method: 'PUT',
headers: {
Authorization: `Bot ${process.env.BOT_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
'status': musicInfo
})
});

if (response.ok) {
console.log('Status updated successfully!');
} else {
console.error('Failed to update Status:', response.statusText);
const responseBody = await response.text();
console.error('Response body:', responseBody);
}
} catch (error) {
console.error('Error updating Status:', error);
}
}
require('dotenv').config();
async function updateStatus(channel, musicInfo) {
try {
const response = await fetch(`https://discord.com/api/v9/channels/${channel.id}/voice-status`, {
method: 'PUT',
headers: {
Authorization: `Bot ${process.env.BOT_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
'status': musicInfo
})
});

if (response.ok) {
console.log('Status updated successfully!');
} else {
console.error('Failed to update Status:', response.statusText);
const responseBody = await response.text();
console.error('Response body:', responseBody);
}
} catch (error) {
console.error('Error updating Status:', error);
}
}
the provided images shows a little bit the working function. As is it works as intended but what i dont know is why its not in the docs from discord.
GitHub
Document Set Voice Channel Status endpoint by advaith1 ยท Pull Reque...
PUT /channels/:id/voice-status note: this endpoint currently requires the x-super-properties header due to the leftover experiment lock requires #6398 (receiving) - this PR will probably fail CI fo...
No description
No description
vanillop ๐Ÿ–ค
vanillop ๐Ÿ–คโ€ข7mo ago
wow nice
Want results from more Discord servers?
Add your server