Old gateway protocols are deprecated and will stop working on October 16th.
I refactored the heartbeat process to its own module. It can now monitor the new Heartbeat ACK opcode and detect a stale connection if no ack is received during the heartbeat interval.
I also refactored the main websocket handler so it can support all opcodes sent by Discord, in addition to the dispatch op. On top of this it should be possible to implement reconnection and use of the resume op to replay messages that DiscordEx might have missed during disconnection.
Changes to support Gateway protocol v6 (https://discordapp.com/developers/docs/topics/gateway#gateway-protocol-versions).
Old gateway protocols are deprecated and will stop working on October 16th.
I refactored the heartbeat process to its own module. It can now monitor the new Heartbeat ACK opcode and detect a stale connection if no ack is received during the heartbeat interval.
I also refactored the main websocket handler so it can support all opcodes sent by Discord, in addition to the dispatch op. On top of this it should be possible to implement reconnection and use of the resume op to replay messages that DiscordEx might have missed during disconnection.
Closes #42