Events for Voice
How can I do something like the following but for voice?
5 Replies
wdym "for voice", it's exactly that.
For example when a user joins or leaves a channel.
I've got above how to do a text related event I can't find how to do a voice related.
Exactly like you wrote it. You listen to the voiceStateUpdate event. https://discord.js.org/#/docs/discord.js/main/class/Client?scrollTo=e-voiceStateUpdate
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Beyond that, you read the old state and new state and diff them accordingly and do what you want to do.
But that's discordjs territory, not sapphire.
I don't think it's working because of intents, I've added GUILD_VOICE_STATE but it says it's invalid bitfield flag.
Found it needed to find the right intent.