Breaking changes.
- New sticker objects with their respective routes
PartialSticker,GuildStickerandStandardSticker.
Message.contentnow defaults toNoneon an empty string- This was typed and expected but never enforced
- Application command events have been removed due to Discord no longer sending them
subscribeno longer returns the function that it is subscribingmemberandauthorare now separate attributes in GuildMessage* events to cause less confusionGuild.is_nsfwhas been replaced withGuild.nsfw_level- Switch cache configurations to flag based configurations
Application.verify_keyrenamed toApplication.public_keyEmoji.parsevalidation removed for the time being- This was removed due to a new unicode version breaking the emojis in old versions of Python and Discord not providing any standardization regarding emojis accepted by the API (discord/discord-api-docs#2782). In light of this, we have also removed
Emoji.unicode_namesas it is not guaranteed to not error
These will be re-enabled or replaced in the future
- This was removed due to a new unicode version breaking the emojis in old versions of Python and Discord not providing any standardization regarding emojis accepted by the API (discord/discord-api-docs#2782). In light of this, we have also removed
regionarguments have been moved fromx_guildtox_channel- This includes moving the attribute in the objects too
format_xmethods have been renamed tomake_x_urlMessage.linkhas been changed toMessage.make_link- This is due to
Message.linkrelying on cache and giving bad results when information was not available
- This is due to
Member.nicknamecan no longer beUndefined. It will default toNoneif unset- Remove
preview_asset_hashfromStickeras it has been fully removed from the API debugargument removed fromVoiceConnectionABC
Features
- Better and cleaner logging
- Base Interaction and slash commands support
- Message components are still being worked on and can be found here: #684
- Improve 50035 400 error reprs
- All components are now multi-use
- More helpful methods and properties added to objects.
- Even more speedups when using python optimization flags (
-Oor-OO) RESTAppis no longer bound to the loop after the first acquire (#619)- New
ComponentStateConflictErrorto better handle state in objects - You can now set the permissions argument to
create_roletoundefined.Undefinedto fallback to default Discord behavior. - Change in rate limit handling to per bucket locks
- This will greatly speedup your application and allow for multiple requests to different buckets without having to wait for another request to a different bucket to finish
- Ability to use models in cache calls (same functionality as REST)
get_guilds_viewmethod has been added to the cache- Ability to replace attachments when PATCHing messages
- See
edit_messageandedit_webhook_messagefor usage
- See
- New
ShardPayloadEventevent- This event will trigger when a shard receives a payload
- Improved interface around
delete_messagesto allow a sequence of messages - New
applications.ApplicationFlags ShardReadyEventnow provides theapplication_idandapplication_flags- New
USE_APPLICATION_COMMANDSpermission - New
Attachment.contentattribute - New
Team.nameattribute - New
Invite.expires_atattribute and newInviteWithMetadata.uses_leftproperty - Fetch authorization endpoint + models
#rest.fetch_authorizationapplications.AuthorizationApplicationapplications.AuthorizationInformation
- Stage channels + methods
- New message flags
MessageFlag.EPHEMERALMessageFlag.LOADING
- New message types
MessageType.GUILD_DISCOVERY_DISQUALIFIEDMessageType.GUILD_DISCOVERY_REQUALIFIEDMessageType.APPLICATION_COMMANDMessageType.GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNINGMessageType.GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNINGMessageType.GUILD_INVITE_REMINDER
- Slash commands OAuth2 scopes (slash command support will come in a future update)
OAuth2Scope.APPLICATIONS_COMMANDSOAuth2Scope.APPLICATIONS_COMMANDS_UPDATE
- Application TOS and privacy policy urls
Application.terms_of_service_urlApplication.privacy_policy_urlAuthorizationApplication.terms_of_service_urlAuthorizationApplication.privacy_policy_url
- New
GuildSystemChannelFlag.SUPPRESS_GUILD_REMINDER - A lot of new REST error codes under
errors.RESTErrorCode
Bug fixes
- Improve bot close sequence to always dispatch and wait on lifetime events
edit_permission_overwriteno longer uses the wrong method- Permissions being mishandled when de-serializing audit logs
- Incorrect keys in audit logs de-serialization
- De-serialization of
Application.public_keyto bytes - Send full heartbeat instead of ACK when receiving heartbeat
- Fix mis-usage of
PAYLOAD_ZLIB_STREAMwhereTRANSPORT_ZLIB_STREAMis being referred to - Improvement in how hikari manages unknown entities to prevent new entities from breaking entity de-serialization and stopping events from being dispatched
- Global lock is no longer acquired when not using authentication
UnicodeEmojiis now hashable
Packages bumped
- attrs 20.3.0 -> 21.2.0
- aiohttp 3.7.3 -> 3.7.4.post0
- colorlog 4.7.2 -> 6.4.1
- aiodns 2.0.0 -> 3.0.0