-
Notifications
You must be signed in to change notification settings - Fork 5
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
BetterDisco 2024.10.10 #7
Closed
Closed
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
Mapping everything out for slash command Attempt 1
pythonic corrections
Map ApplicationCommandCreate event; Map ApplicationCommandUpdate event; Map ApplicationCommandDelete event; pythonic corrections; Silence errors spawned from messages that lack content Co-authored-by: Justin <justin@aperturebot.science>
…ect issues with on_error's failure to fire after version 0.48.0.
…may correct issues with on_error's failure to fire after version 0.48.0." This reverts commit 40565c8.
- Import metaclasses only instead of everything in the memory-leak that is six - Restore original voice bits; will be optimized as telecom remains incomplete - Initial changes to tutorial docs; pending rewrite
- Catch ConnectionTimeouts
- Set wsApp timeout; enable trace to restore status codes on_close; - Update six (1.15.0 > 1.16.0)
- requests (2.28.2 >> 2.30.0); Support for usernames without discriminators; Document global_name and avatar_decoration in disco.types.user.User; Fix default avatars as the old named files have been deleted; Additional cleanup
- requests (2.30.0 >> 2.31.0); - websocket-client (1.5.1 >> 1.5.2); Deprecate mention_nickname on GuildMember object; Map GuildMemberFlags in disco.types.guild; Set CommandLevel.DEFAULT on commands without a level defined; Cache threads from MessageCreate events; Patch cross-shard communication when using auto-sharder; unfinished logging tweaks
- websocket-client (1.5.2 >> 1.5.3); Memory management tweaks;
- gevent (22.10.2 >> 23.7.0); - websocket-client (1.5.3 >> 1.6.1)
- gevent (23.7.0 >> 23.9.1); - websocket-client (1.6.1 >> 1.6.3)
- websocket-client (1.6.3 >> 1.6.4)
- websocket-client (1.6.4 >> 1.7.0)
- Updated and sorted disco.api.http mappings; - Renamed ambiguous disco.api.http mappings; - Removed deprecated _shallow flag in disco.bot.plugin loader; - Swap earl-etf for Discord's erlpack for better compatibility; - Updated disco.gateway.events with new event types; - Adjusted behavior of disco.gateway.events `@attach` deco to be chainable; - Created `GatewayEventException` class for disco.gateway.events exceptions; - Removed disco.types.__init__ contents (it did nothing); - Added properly-named object representations for several common classes; - Updated various disco.types files with new mappings; - disco.types.base: Migrated all `datetime` objects to a timezone-aware state; - disco.types.base: Made errors a bit noisier with better detail when Disco throws an unexpected error; - disco.types.base: `enum()` will now return str keys instead of int values, as per original disco functionality; - disco.types.base: `BitsetValue` object can be cast to list to view their keys as strings natively; - disco.types: All `BitsetMap`s, such as `PermissionValue`, will return as full objects, but can be cast to int to maintain previous functionality; - disco.types: All `NONE = 0` mappings in `BitsetMap`s removed; new `BitsetValue` behavior will compensate; - disco.types: All `Flag` values mapped as `BitsetMap` instead of `int` (where applicable); - disco.types.channel: Renamed NEWS channel types to ANNOUNCEMENT; - disco.types.guild: Renamed `VerificationLevel.EXTREME` -> `VERY_HIGH`; - disco.types.guild: Renamed `GuildEmbed` -> `GuildWidgetSettings` - disco.types.guild: `GuildMember.permissions` is now a `PermissionsValue`; previous function renamed `get_permissions`; - disco.types.guild: Removed deprecated `Guild.region` [voice]; - disco.types.guild: Removed deprecated `Guild.create_channel` (in favor of other available specific options); - disco.types.integration: Typo correction in `IntegrationExpireBehaviors.REMOVAL_ROLE` -> `REMOVE_ROLE`; - disco.types.message: Renamed `ComponentTypes.SELECT_MENU` -> `STRING_SELECT`; - disco.types.message: Use native `Message.member` object from API instead of calling state [💯]; - disco.types.message: `Message` objects will now return `Thread` objects properly; - disco.types.message: Removed `Message.create_reaction` in favor of `Message.add_reaction`; - disco.types.reactions: Removed `MessageReactionEmoji` in favor of native `Emoji`/`GuildEmoji` objects; - disco.types.reactions: Renamed `StickerItemStructure` -> `StickerItem`; - disco.util.emitter: More error catching/logging, possibly; - disco.util.enum: deprecated Holster requirement; - disco.util.snowflake: `datetime` is now timezone-sensitive and set to UTC; - disco.voice.client: Better support for encodings, like ETF; - disco.client: Added `compression` config option for GW payloads, default `True`; - disco.state: Fixed leaky members, user, and channels; - disco.state: Mapped more event types; This commit is very likely a breaking change to many bots. Test your code with this update in a non-production environment first, foremost, and always. A lot has changed, but much functionality remains -- the biggest change being default expected behavior in certain instances noted above.
- disco.state: Added new `sync_guild_members_on_startup` config option to separate `sync_guild_members` functionality from possibly undesirable startup behavior in larger bots; - disco.state: Sync missing channel, member, and user bits from received `InteractionCreate` events; - disco.state: Cache members and users from `GuildVoiceState` on `GuildCreate` and `VoiceStateUpdate` events; - disco.state: Bug corrections; - disco.api.client: Mapped `flags` on `channels_messages_create`; - disco.api.client: Mapped `applications_global_commands_bulk_overwrite`; - disco.bot.command: Properly return CommandEvent.thread - disco.bot.command: Return `Interaction.user` for `CommandEvent.author` on InteractionCreate events; - disco.bot.command: Properly return `Interaction.member` for `CommandEvent.member` on InteractionCreate events; - disco.gateway.client: Prevent the sending of data when the websocket connection is closed; - disco.gateway.events: Attach `guild_id` to `Interaction.member`; - disco.gateway.events: Attached `member` to `VoiceStateUpdate` events; - disco.gateway.events: Mapped an unknown event type; - disco.gateway.events: Attach `timestamp_ns` to `event._event.raw_data` for optional event time tracking; - disco.types.application: Mapped `Interaction.recipients`; - disco.types.application: Mapped useful functions found on `Message` objects on the Interaction object; - disco.types.channel: Mapped `Channel.disconnect` to disconnect from VCs; - disco.types.guild: Mapped `GuildMember.unusual_dm_activity_until` - disco.types.guild: Created `GuildVoiceState` to handle cyclical import issue from `disco.types.voice`; - disco.types.guild: Updated `DiscoveryRequirements`; - disco.util.metaclass: Deprecation of six dependency; - disco.util.serializer: Swap `pickle` package for `dill`;
- gevent (23.9.1 >> 24.2.1) Upstream updates from Discord's API changes: - disco.types.message: mapped `poll` attribute on `_Message` object - disco.types.message: generated all class objects related to new `MessagePoll` bits
- disco.state: add caching toggles (with logical boolean defaults) for DM channels, channels, threads, roles, users, voice states, emojis, stickers, soundboard, scheduled events, stage instances; - disco.state: optimize imports
- optimize imports across all files to reduce memory usage; - disco.api.http: better request error status code handling; - disco.gateway.client: add `/` between GW URL and query params; - disco.gateway.client: reset `self.seq` to zero on new connection, though Discord should be doing this on their end as well; - disco.gateway.events: map `MessagePollVoteAdd` and `MessagePollVoteRemove` events; - disco.gateway.packets: map missing OPCodes; - disco.gateway.sharder: add `timeout` to `ShardHelper.on()`; - disco.types.guild: map `InventorySettings`; - disco.types.guild: proper handling of `Guild.get_member()` if caching is disabled; - disco.types.user: `ActivityTimestamps` UTC-compliance; - disco.types.voice: add `channel_id` to `VoiceState` repr; - disco.types.voice: proper handling of `VoiceState.channel` if caching is disabled; - disco.voice.client: properly handle error code 4006; - disco.voice.packets: map missing voice OPCodes;
… on non-Linux systems: - disco.util.websocket - disco.voice.opus
- objects cast to `enum()` will return an `EnumAttr()` object, which contains both the name and value of the object -- ideally, this _shouldn't_ break things, and will allow users to access both values held by the object, rather than the original name-alone or newer value-alone behavior
…how str list when cast to str
- disco.util.crypto: because pynacl's devs are a bunch of evildoers; - disco.voice.client: cleanup and enable `aead_aes256_gcm_rtpsize`; - disco.voice.udp: 😸 where the *magic* happens; implemented AEScrypt, my own wrapper for aead VC modes; With thanks to the maintainer of algos (https://git.kaydax.xyz/w/algos), who discovered how to decrypt Discord's AEAD bits.
- disco.voice.udp: follow nonce format used by Discord for `xsalsa20_poly1305_suffix` - disco.voice.udp: account for 12 Byte nonce of AES256 on decrypt - disco.voice.udp: account for different header size of `_rtpsize` modes on decrypt
- disco.types.channel: add toggle to `Channel.connect()` for video packets; - disco.voice.client: enable video reception and everything needed to make it happen; - disco.voice.udp: everything needed to handle RTP video packets; - requirements.txt: websocket-client (1.7.0 >> 1.8.0); - setup.py: add `libnacl` as a voice requirement; My life has become RFCs. Though useless as a raw RTP stream, it's a step closer to something useful.
- disco.api.client: added `enforce_nonce` variable on `channels_messages_create`; - disco.api.client: better handling of items on `channels_messages_modify`; - disco.types.permissions: `USE_CLYDE_AI`, `SET_VOICE_CHANNEL_STATUS`, `SEND_POLLS`; - disco.types.message: do not create `MessageComponent.emoji` if none; - disco.types.user: Mapped `15` missing user flags; - disco.types.user: Mapped `banner_color`, `clan`, `bio`, `avatar_decoration_data` on `User` object; - disco.voice: misc. optimizations;
- requests (2.31.0 >> 2.32.1)
- requests (2.32.1 >> 2.32.2)
- disco.api.http: map `GUILDS_ROLES_GET`, `GUILDS_VOICE_STATES_ME_GET`, `GUILDS_VOICE_STATES_GET`; - disco.types.oauth: map `approximate_user_install_count` and `integration_types_config` on `Application` object; - disco.voice.client: update `VOICE_GATEWAY_VERSION` to version 8, remove deprecated encryption modes, add support for new `seq` on voice gateway events, update structure of heartbeat and resume payloads, reset seq on fresh connections; - disco.voice.udp: remove support for deprecated encryption modes; Updated requirements.txt: - requests (2.32.2 >> 2.32.3)
- disco.util.crypto: removed `pynacl`; - disco.voice.udp: cleanup;
- disco.types.message: mapped `MessageFlags`: `SUPPRESS_NOTIFICATIONS`, `IS_VOICE_MESSAGE`; - disco.types.message: mapped `MessageIntegrationMetadata` object; - disco.types.message: mapped `MessageCall` object; - disco.types.message: mapped `Message.position`, `Message.role_subscription_data` attributes; - disco.types.message: mapped `MessageResolvedData` object; - disco.types.message: mapped `MessageSnapshot` object; - disco.types.message: make `Message.author` optional in instances where it's not provided;
- disco.api.client: define a repr for Disco's APIClient object; - disco.bot.bot: define a repr for Disco's Bot object; - disco.bot.bot: log invalid plugin paths as errors instead of exceptions; - disco.gateway.client: define a repr for Disco's GatewayClient object; - disco.gateway.client: use the websocket's ping to calculate latency instead of running our own calculation; - disco.voice.client: use the websocket's ping to calculate latency instead of running our own calculation; - disco.voice.client: keep list of VoiceClient.experiments as sent from the gateway; - disco.voice.client: define a repr for Disco's VoiceClient object; - disco.voice.client: log invalid voice gateway packets as errors instead of exceptions; - disco.voice.client: log failed voice channel connections as errors instead of exceptions; - disco.voice.packets: map `CLIENT_CONNECT` as OP 11 (not 18), `CLIENT_FLAGS` as OP 18; - disco.voice.udp: fix `UDPVoiceClient.connect()` IP stringification; - disco.client: define a repr for Disco's Client object; - disco.state: define a repr for Disco's State object; - disco.state: do not cache webhooks in `User` cache on `MessageCreate` events; - pyproject.toml: what could possibly go wrong?; - README.md: there's a meme in here somewhere?; Update requirements.txt: - gevent (24.2.1 >> 24.10.1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.