Edit history

`VOICE_STATE_UPDATE` event should include the previous status has not been edited, so there are no earlier versions.

Current version | Original by frog
Show

`VOICE_STATE_UPDATE` event should include the previous status

Current problem

both the fluxer and discord APIs don't include the previous state in the event data, which makes it difficult to tell what the event actually was (did a user join a call, mute or seafen? etc). to figure this out, you need to save the previous state and compare it against the current one.

Proposed change

include the previous state in the event data

Additional information

discord.js's voiceStateUpdate event works around this by caching previous states so that it can take two arguments: oldState and newState. it stores the old state in a cache. source code fluxer.js however doesn't do this. i opened an issue for it, but i figured it would be better if the fluxer API handled it, so that each client library doesn't have to.