Issues with getting an guild ID
Hello! I'm trying to receive an guild ID using the @discordjs/voice package, but everytime I try to request it it returns with
undefined
, so ofcourse it doesn't work. How can I make it work?2 Replies
- 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!
- ✅
Marked as resolved by OP-
[email protected]
and using node version v18.18.0
- I'm trying to make an /setvolume slash command to change the volume of the bot when it's playing its music. But I need to get the guild ID. I tried everytime all options, but just by console logging interaction.guild.id
it returns with the guild id. When I put in the getVoiceConnection
part it returns with undefined
so how will I define the guild ID?
- my entire code: https://sourceb.in/Y0YvSgomYF
I have a different command called 'play' that joins the voice channel throughout a lavalink-client package. So it's in theory already in a VoiceChannel, but that package doesn't support lowering the volume. So how can I do it then?
Ah sad. I'll look/request then if they can add a feature like that. Anyways thanks!