Changelog¶
v0.5.0¶
Full Changelog: https://github.com/thegamecracks/discord-ws/compare/v0.4.0…v0.5.0
Fixes¶
Fix py.typed marker not being included in the package
Use
if __name__ == "__main__":condition indiscord_ws/__main__.pyto prevent side effects when imported
Documentation¶
Add this documentation site
If you found me from the repository, 👋 hello!
v0.4.0¶
Full Changelog: https://github.com/thegamecracks/discord-ws/compare/v0.3.0…v0.4.0
Breaking Changes¶
Significantly refactor
Clientinternal methods for improved extensibilityClient.run(reconnect=False)may now raiseGatewayReconnectandSessionInvalidatedClient.run()is now expected to raise an exception groupRemove
Heart(client)dependency in favour of directly accepting a stream inHeart.stay_alive()Remove client attribute from
Streamprotocol in favour ofwsinterface
New Features¶
Add
Client.presenceandClient.set_presence()for setting bot presenceAdd
Client.large_thresholdto specify the desired threshold for offline members to not be sent
Fixes¶
Correct typo causing
seqto be missing when sending RESUME event
v0.3.0¶
Full Changelog: https://github.com/thegamecracks/discord-ws/compare/v0.2.0…v0.3.0
Breaking Changes¶
Potentially raise
HeartbeatLostErrorwhen usingClient.run(reconnect=False)rather than cleanly exitingRemove
Client.create()classmethod in favour of constructingClientdirectlyReplace
on_dispatchparameter fromClient()withClient.on_dispatch()method
Fixes¶
Prevent potential race condition with session ID being unset
Use local
Randominstance in heartbeat to avoid affecting user state
v0.2.0¶
Full Changelog: https://github.com/thegamecracks/discord-ws/compare/v0.1.0…v0.2.0
New Features¶
Improve logging of connection closures
Implement exponential backoff to avoid spamming Discord with connections
Fixes¶
Prevent full write buffer from causing double heartbeats
Fix client reconnecting after calling
Client.close()
Documentation¶
Indicate that bot tokens should be prefixed with
Bot
v0.1.0¶
This marks the first release of the discord-ws library! 🎉
$ python -m discord_ws --env-token TOKEN --no-intents
discord_ws.client.client ( DEBUG) => Requesting gateway URL
discord_ws.client.client ( DEBUG) => Starting connection loop
discord_ws.client.client ( DEBUG) => Creating websocket connection
discord_ws.client.stream ( DEBUG) => Received 124 chars
discord_ws.client.client ( DEBUG) => Received hello from gateway
discord_ws.client.heartbeat ( DEBUG) => Waiting 42.17s for heartbeat
discord_ws.client.client ( DEBUG) => Sending identify payload
discord_ws.client.stream ( DEBUG) => Received 1855 chars
discord_ws.client.client ( DEBUG) => Received READY event