feat(VoiceState): self mute/deaf methods (#3243)

* Implemented setSelfMute/Deaf, done typings, fixed bug in VoiceState with errors.

* Completed requested changes

* return send in sendVoiceStateUpdate so its a promise, update typings

* Updated methods to return a boolean

* Requested changes

* Fix bug

* Update src/structures/VoiceState.js

Co-Authored-By: MrJacz <23615291+MrJacz@users.noreply.github.com>

* fix
This commit is contained in:
Jacz
2019-05-04 01:11:11 +10:00
committed by SpaceEEC
parent a59968f7de
commit 692494dc04
4 changed files with 40 additions and 5 deletions

View File

@@ -51,6 +51,8 @@ const Messages = {
VOICE_PRISM_DEMUXERS_NEED_STREAM: 'To play a webm/ogg stream, you need to pass a ReadableStream.',
VOICE_STATE_UNCACHED_MEMBER: 'The member of this voice state is uncached.',
VOICE_STATE_NOT_OWN: 'You cannot self-deafen/mute on VoiceStates that do not belong to the ClientUser.',
VOICE_STATE_INVALID_TYPE: name => `${name} must be a boolean.`,
UDP_SEND_FAIL: 'Tried to send a UDP packet, but there is no socket available.',
UDP_ADDRESS_MALFORMED: 'Malformed UDP address or port.',