Skip to content

Conversation

@Snazzah
Copy link
Contributor

@Snazzah Snazzah commented Oct 12, 2024

@AlexFlipnote AlexFlipnote merged commit afbe8a7 into AlexFlipnote:feat/gateway Oct 13, 2024
1 check passed
@Snazzah Snazzah deleted the fix/sounds-update branch October 13, 2024 00:04
@AlexFlipnote AlexFlipnote added the hacktoberfest-accepted Just for hacktoverfest lol label Oct 13, 2024
AlexFlipnote added a commit that referenced this pull request Dec 22, 2024
* Initial gateway implementation

* Refactoring, cache (opt-in), stability and working consept

* More cache- and event handling. Polishing overall too

* Improve gateway-only handling of cache to not overdo

* Remove debug print

* Enhance audit logging with new types, improve asset handling for images, and refine thread management in cache

* Rename md file to show up on GitHub

* Parse channel_pins_update & typing_start

* Fix typing errors

* Create helper methods for guild, channel and user/member

* Better helper methods

* Add Reaction and BulkDeletePayload classes to object.py; update imports and typing in related modules

* Add soundboard sounds

* Support for forward message

* Update README.md to mark GUILD_EMOJIS_UPDATE and TYPING_START as completed; rename flag doc to flags

* Refactor typing in Message class for view and message references; improve optional handling for clarity and type safety

* Handle other soundboard events

* Add get/fetch functions to client

* Fix small doc error

* Support for guild integrations

* Add missing attachment fields

* Remove unused imports

* Corrections to (Partial)Integration

* Support message_reaction_remove_all/emoji

* Correct various types in ReactionRemoveEvent

* Provide guild_id to (Partial)Message

* Provide MessageID to get/fetch

* Support setting flags when sending/deferring messages

* Refactor flags handling to use MessageFlags type in InteractionResponse and Response classes for better type safety

* Support for empty- and later response

* No need to pass guild separately

* Remove duplicated enum

* Remove ReactionRemoveEvent in favour of PartialMessage

* Fix slots

* Resolve partial placements and state usage

* Resolve partial for less RAM in cache

* Improve ThreadMember object

* Allow cache easy access from state and resolve class variable

* Provide client to state and resolve other issues

* Add support for stage instance (#7)

* Add support for stage instance

https://discord.com/developers/docs/resources/stage-instance

* Add StageChannel.fetch_stage_instance

* Slot StageInstance

* Support thread member events (#8)

* Support thread member events

* Formatting

* Refactor ThreadListSyncPayload.combined as generator

---------

Co-authored-by: AlexFlipnote <[email protected]>

* Adjust related imports and resolve types

* Add changes in here just in case too

* shush pyright, this code is fine

* Add presence updates and update related enums and types in gateway functionality

* Adding metadata for v2 when it comes out

* Overall gateway coverate, docs update and polishing

* One more todo

* Add tutorial on testing

* Intent checking and presence update on boot and demand

* Update parsing and docs

* Add type to Message object

* Using cache multiple places, new attributes and making sure it works better

* Removing warn() which is getting deprecated

* Make sure all ID from parser is int and not str

* Disable autoshard if shard_count=1

* Type formatting, more cache use, better names, etc

* Add delay to message delete

* Better type support for Py3.11 in command args

* Add interaction metadata to Message

* QoL changes and overall polishing

* Reverting due to consistency

* Resolve issues and polish code

* Add a global check for all commands

* Fix type issues

* Forgot to add this to github workflows

* Add SEO for docs

* fix: fix `GUILD_SOUNDBOARD_SOUNDS_UPDATE` event being parsed wrong (#10)

* add possible "async with typing"

* Better handling of InteractionStorage with Context.id usage

* Support custom id strings, useful for modals

* Improve InteractionStorage to handle custom_id and Context.id more robustly. Adapt message caching logic accordingly

* Remove websockets dependency and re-use aiohttp session to have WS connection.

* Update type-hints to >=py3.11 and docstring for `discord_http.gateway`

* From-To version dependencies

* Migrate more to py3.11 type

* More py11 type style

* MISSING has to be inside quote

* Remove unresolved data

* Add more attributes

* Start of undocumented guild_join_request

* Send full Role if cached

* I do not enjoy undocumented things

* Hashable Snowflake

* Fix docs error

* Better cache event

* More accurate info

* Forgot about circual import preventions

* Add Channel.mention

* Improve bulk delete method

* Not sure how this was unchecked for so long

* Don't duplicate sub-sub commands, respect parent variable

* Introduce default avatar property for User and Member

* Fix bugs, add missing resolve value and support custom converters for commands

* Docs for converter

* Move create guild call to somewhere that makes more sense

* Fix invalid channel resolver

* Implement ability to fetch all- and individual bans

* Add PermissionType to __all__

* Add copy method for both Flag and PermissionsOverwrite

* QoL, missing attributes, etc

* Improve cache flow

* Add cache possibility in a Message object

* More QoL, forcing int ID, etc

* QoL changes, add custom retry codes

* Just making sure id is always int

* More strict update values

* Remove redundant id assignments

* Allow commands.Choice to be actually used with Optional/Union

* Attempt to load JSON on 4XX error

* Allow disabled link button

* Optional type

* Add delete_after attribute

* Don't crash shard due to parse issue

* Add missing audit (thanks undocumented docs)

* Forward is funny

* Try to JSONify error for both 429 and 400

* Resolve optiona user_id

* Force int on request

* Typing fix

* QoL change to make it consistant

* Use correct object

* Tell what method was used in ratelimit warn

* Provide cached channel in Context if available

* More cache and fix thread bug

* Allow invalid Audit enum, but warn about it in debug

* Guild chunk update

* Make this a debug log instead

* Use cache if possible (guild/channel)

* Resolve edge case where Microseconds is appended to UNIX timestamp

* Dynamic version between HTTP and WS

* Thread Delete event fixed and parent cache

* Improve thread cache

* typo for threads cache

* Resolve no intent bug

* Better error display for Discord

* Return either cached guild or data guild

* Resolve issues with setters and properties

* Include a guild checker for commands.guild_only alias

* Updating Discord link

* Update cache to get member regardless, if guild is enabled

* Fallback to errors

* Add support for clan in user/member

* Few fixes and QoL

* Fix american color spelling for API

* Parse audit reason in urllib

* Fix Colour.from_hex() removing character after # parsing

* Change strategy if only 1 message provided to bulk

* Add cache channel to reaction

* More type safty and small fix

---------

Co-authored-by: Soheab <[email protected]>
Co-authored-by: Snazzah <[email protected]>
Co-authored-by: Snazzah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Just for hacktoverfest lol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants