Closed switchupcb closed 2 years ago
The following issues have occurred due to an incorrect type definition or non-existent type definition:
Disgo avoids these issues through the usage of Dasgo. In short, @diamondburned may benefit from using Dasgo to stay up-to-date while reducing maintenance load.
https://github.com/diamondburned/arikawa/issues/39 occurs due to a custom API that is not machine generated.
In issue https://github.com/diamondburned/arikawa/issues/44, @mavolin points out the issue with using functions that accept parameters. The provided solution adheres to ariwaka
's dedication to provide functions, which means that certain functions require parameters while others accept structs. In contrast, every "request" in Disgo is a struct with one reliable Send()
function.
Hey @diamondburned, an example to the solution to https://github.com/diamondburned/arikawa/issues/153 can be viewed in request.go
Line 304. One thing we are unsure about is whether floating point precision can cause reading a Retry-After
header to be slightly incorrect; which has implications if it's set too early.
I'm not sure what the cause of https://github.com/diamondburned/arikawa/issues/286 is, but @no3371 states that he attempts create a connect call when Discord issues a reconnection. We avoid this issue from occurring in two ways:
Connect()
a session that is already connected, this results in an error.https://github.com/diamondburned/arikawa/issues/309 is an issue (by @hi117) that focuses on ariwaka's use of reflection. Disgo avoids reflection and type assertion through the use of Copygen, which generates all event handling functionality.
https://github.com/diamondburned/arikawa/issues/324 is addressed by tracking the amount of heartbeats we have received since the last time a Heartbeat was sent. The counter for heartbeat acks is incremented when an Opcode 1 Heartbeat or Opcode 11 Heartbeat is received. The counter is cleared when a Heartbeat is sent. This ensure that Disgo will detect when a Heartbeat has not been sent in an entire interval since it would have not received a Heartbeat or HeartbeatACK from the other side of the WebSocket Connection.
Source: https://github.com/switchupcb/disgo/blob/v10/wrapper/session_heartbeat.go#L63
Disgo solves the following problems from https://github.com/diamondburned/arikawa/issues.