Skip to content

v0.10.0 Release.

Compare
Choose a tag to compare
@bwmarrin bwmarrin released this 27 Jan 19:31

Notice

  • Session.Voice.UDPConn and Session.Voice.OP2 may be unexported in the v0.11.0 release.

Enhancements

  • If Session.ShouldReconnectOnError is set to true (defaults to true when using New()) the library will now try to reconnect to Discord all on it's own when it disconnects due to an error. This will slowly back off attempts on each try until it hits 10 minutes then it will try every 10 minutes. 54e14ba
  • Added support for compressed websocket data. This is enabled by default when using the New() func. You can disable/enable it by setting the Session.Compress bool to true/false. fd32614
  • Added new function, GuildMemberEdit that can be used to edit the roles of a Guild Member. 46f893c
  • Session.Voice.Opus channel added. Opus data sent to this channel (48000 sampling, 960 size) will be sent to Discord. NOTE it is possible this channel name could change as Voice is still a bit on the experimental side. 4b1baec
  • Added OnConnect and OnDisconnect event handlers 54e14ba
  • New() func now also accepts Token, User, and Pass together b5a4680
  • State tracking feature now also tracks messages bf20fff
  • Added funcs GuildSplash() and GuildIcon() b4dfce0

Breaking Changes

  • Changes to Login func will break existing uses of the function. Please use New() function if possible :). Otherwise, Login function no longer returns the Token, instead it stores the token directly into the Session.Token variable. b5a4680
  • Changes to New(), Open(), and Listen(). New() no longer opens a websocket connection, which allows you to use it for cases where you only need the restapi and also allows you to setup callback functions before you connect to the websocket. Listen() has been removed. Open() will now call Listen in a goroutine. 94b087c