-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2.0.0 #66
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'struct discord' * fix: replace outdated references to HAS_DISCORD_VOICE with CCORD_VOICE
…e make's voice target
…ent data around callbacks
…discord_ret_xxx types
discord_update_voice_state() and discord_update_presence() * feat(discord-gateway): implement all Gateway Commands and refactor existing ones for consistency
…eway_command.c, update structures and methods accordingly
…ic from discord_gateway_perform()
…e its type u64unix_ms -> int64_t
the bot token from the payload * refactor: replace bot's 'token' field type with a 'char *'
…nd document struct discord_response
…lds ('parse' and 'json')
…st at workflows/test_build.yml to ensure its not broken
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing feature
Missing Discord API feature
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Also
#69
What?
1.1. Struct wrapping of callback parameters
1.2. Requests are now performed in enqueue order
1.3. Replace
DISCORD_GATEWAY_EVENTS_*
macro prefix withDISCORD_EV_*
1.4. Rewrite
discord_set_on_commands()
function signature2.1. Add functions for all Gateway commands
2.2. Add
discord_claim()
anddiscord_unclaim()
to grant client's ownership of Concord parameters, and override automatic cleanup3.1. Regression where WebSockets sessions were not being resumed
3.2. Requests can now be sent in parallel even while there are requests being performed from the main-thread
discord-gateway.c
Message Commands
handling to perform its register and search operations on a hashtableAdapter
references withREST
Why?
1.1. Struct wrapping of callback parameters
1.2. It is intuitively expected that the order of requests respects the order of their enqueue
1.3. Reduce length for macros that are very often used
1.4. The previous method of NULL-terminating a
va_list
of message commands was non-intuitive2.1. On-going effort of covering the entire Discord API
2.2. Allows client to keep ownership of Concord callback's parameter, rather than having to tediously clone the data of interest if they wanted to keep it between callbacks
3.1. Sessions should be resumed when possible, rather than starting a new one on every reconnect
3.2. Before user had to opt between choosing between synchronous or asynchronous requests, now they can do both simultaneously
discord-rest_ratelimit.c
anddiscord-refcount.c
Adapter
was a misnomer back from Orca development, replacing it withREST
gives a better description of it being a interface to the Discord's REST APIHow?
Breaking changes
1.1. By wrapping callback parameters in structs:
before v2.0.0
after v2.0.0
1.2. By limiting to only one request per-bucket being sent at a time
1.3. Edit previous macros at
gencodecs/api/gateway.pre.h
1.4. Rewrite
discord_set_on_commands()
function signaturebefore v2.0.0
after v2.0.0
2.1. See 1498dc3
2.2. Add
discord_claim()
anddiscord_unclaim()
to grant client's ownership of Concord parameters, and override automatic cleanup