Skip to content

Base interactions, slash commands support and a lot of bugfixes

Pre-release
Pre-release
Compare
Choose a tag to compare
@davfsa davfsa released this 28 Aug 08:51
· 1125 commits to master since this release
9a93c10

Breaking changes.

  • New sticker objects with their respective routes
    • PartialSticker, GuildSticker and StandardSticker.
  • Message.content now defaults to None on an empty string
    • This was typed and expected but never enforced
  • Application command events have been removed due to Discord no longer sending them
  • subscribe no longer returns the function that it is subscribing
  • member and author are now separate attributes in GuildMessage* events to cause less confusion
  • Guild.is_nsfw has been replaced with Guild.nsfw_level
  • Switch cache configurations to flag based configurations
  • Application.verify_key renamed to Application.public_key
  • Emoji.parse validation 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_names as it is not guaranteed to not error
      These will be re-enabled or replaced in the future
  • region arguments have been moved from x_guild to x_channel
    • This includes moving the attribute in the objects too
  • format_x methods have been renamed to make_x_url
  • Message.link has been changed to Message.make_link
    • This is due to Message.link relying on cache and giving bad results when information was not available
  • Member.nickname can no longer be Undefined. It will default to None if unset
  • Remove preview_asset_hash from Sticker as it has been fully removed from the API
  • debug argument removed from VoiceConnection ABC

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 (-O or -OO)
  • RESTApp is no longer bound to the loop after the first acquire (#619)
  • New ComponentStateConflictError to better handle state in objects
  • You can now set the permissions argument to create_role to undefined.Undefined to 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_view method has been added to the cache
  • Ability to replace attachments when PATCHing messages
    • See edit_message and edit_webhook_message for usage
  • New ShardPayloadEvent event
    • This event will trigger when a shard receives a payload
  • Improved interface around delete_messages to allow a sequence of messages
  • New applications.ApplicationFlags
  • ShardReadyEvent now provides the application_id and application_flags
  • New USE_APPLICATION_COMMANDS permission
  • New Attachment.content attribute
  • New Team.name attribute
  • New Invite.expires_at attribute and new InviteWithMetadata.uses_left property
  • Fetch authorization endpoint + models
    • #rest.fetch_authorization
    • applications.AuthorizationApplication
    • applications.AuthorizationInformation
  • Stage channels + methods
  • New message flags
    • MessageFlag.EPHEMERAL
    • MessageFlag.LOADING
  • New message types
    • MessageType.GUILD_DISCOVERY_DISQUALIFIED
    • MessageType.GUILD_DISCOVERY_REQUALIFIED
    • MessageType.APPLICATION_COMMAND
    • MessageType.GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING
    • MessageType.GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING
    • MessageType.GUILD_INVITE_REMINDER
  • Slash commands OAuth2 scopes (slash command support will come in a future update)
    • OAuth2Scope.APPLICATIONS_COMMANDS
    • OAuth2Scope.APPLICATIONS_COMMANDS_UPDATE
  • Application TOS and privacy policy urls
    • Application.terms_of_service_url
    • Application.privacy_policy_url
    • AuthorizationApplication.terms_of_service_url
    • AuthorizationApplication.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_overwrite no 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_key to bytes
  • Send full heartbeat instead of ACK when receiving heartbeat
  • Fix mis-usage of PAYLOAD_ZLIB_STREAM where TRANSPORT_ZLIB_STREAM is 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
  • UnicodeEmoji is 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