Releases: interactions-py/interactions.py
4.1.0
What's Changed
- NEW: Introduced
interactions.extSDK framework. - Finalised HTTP rate limit implementation with corrections.
- Added BitField objects for User & Application flags
- Refactored methods to use the
MISSINGvalue - Fixed the formerly outdated User-Agent HTTP header
- Implemented basic "cogs"/Extensions
- Added the ability to pass command names in
@autocomplete - Added more helper methods to data models
- 💥BREAKING: Corrected
guild_scheduled_eventmethod and JSON serialisation in helper methods - Implemented
idproperty method intoMember - 💥BREAKING: Fixed rename method name
get_application_command - Corrected quickstart typos
- Implemented
mentionproperty method into data models - Implemented new Permissions v2.01 system
- Implemented
GET Guild Audit Logendpoint toHTTPClient - Added population to
_Context'sguildandchannelattributes when available or withMISSING - Implemented
custom_idandlabelproperty methods into_Context - Clarified eligibility for contributor role in contribution requirements
- Added failsafe for payload creation from non-present values in
ComponentContext - Added the ability to pass
custom_idin@modal - Refactored catching parameters for dispatching
- Fixed JSON references from
dictcomparisons for component context - Outlined and given better streamline process for quickstart documentation
- Fixed minor command synchronization issues and exceptions
- Refactored files to comply with Sourcery AI workflow
- Added modals to the quickstart documentation
- Implemented
get_extensionmethod toClient - Implemented
Locale/localisation enumerable object - Added string argument support for modals in extensions
- Fixed
Emojiinstantiation mapping forSelectOption - Redocumented
CommandContext's structure - Refactored command payload checking
- Implemented
avatar_urlproperty method intoUser - Corrected JSON parsing for non-existent
Emojiarguments - Refactored context to be a mixin class
_Context - Refactored the Gateway's approach to connection and dispatching events
- Refactored components as an extraction state for building sending models
- Implemented
Client'sPresencestate on connection - Added
Presenceenumerable representation support - Fixed
send()/edit()context functionality - Abstracted
modifymethod in data models for simplified usage - Corrected exceptions for non-chat-input-based commands when a description is
MISSING - Added failsafe to conflicts between
__slots__and method names - Implemented
latencyandreadyattributes inWebSocketClient - Corrected Gateway command and subcommand dispatching
- Improved documentation on Extensions
- 💥 BREAKING: Removed requirement of
reasonin helper methods - Fixed
Embedserialisation in messages when sending/editing - 💥 BREAKING: Introduced proper graceful reconnection logic without close
New Contributors
- @panley01 made their first contribution in #459
- @Middledot made their first contribution in #460
- @Highfire1 made their first contribution in #469
- @mAxYoLo01 made their first contribution in #473
- @Jplight made their first contribution in #447
- @Damego made their first contribution in #495
Thank you to all of the contributors on our team who work hard to ensure a quality-driven product to users. We are committed here at interactions.py to provide you the very best library for interactions in Python. We look forward to keeping the promise with you all throughout the years to come.
Full Changelog: 4.0.2...4.1.0
4.0.2
What's Changed
- 💥Refactored the synchronization process to remove global edge cases and less rate limited
- Updated the license to use GPL-3.0
- Fixed parsing of
OptionandChoicefor JSON sending representation - Introduced new models to represent Gateway events:
EmbeddedActivityforEMBEDDED_ACTIVITY_UPDATEGuildJoinRequestforGUILD_JOIN_REQUEST_CREATE,GUILD_JOIN_REQUEST_UPDATEandGUILD_JOIN_REQUEST_DELETE.IntegrationforINTEGRATION_CREATE,INTEGRATION_UPDATEandINTEGRATION_DELETE.
- Fixed caching error where models require
id - 💥Corrected
Embedand like object parsing - Added various undocumented attributes from numerous API schemas
- 💥Changed the usage state of
HTTPClient._stateis now required for supplying endpoint data - Rewritten HTTP requesting logic to follow a more sane rate limitation based on per-route, globally and on buckets.
- Added the ability to send/edit multiple action rows
- Optimize performance of #393
- Added new helper methods for models, including:
- Fixed a typo in button documentation
- Fixed major sending and editing logic in components
- Added new feature converters
@message_commandand@user_command - Corrected documentation on autocompletion
- Ended forced configuration on logging
- Added permissions representative for guild roles
- 💥 Fixed command corruption in the interactions cache
- Correct documentation on importing for lackluster
- Remove leftover
printstatements for debugging - Fixed how Gateway parse
SelectOptionperSelectMenuobject - Refactor sending components in the main context
- Developer dependencies/tools are now isolated into
[dev]upon module installation. - Fixed
NoneTypeclosure during a guild member check - Fixed documentation on optional
?formatting loosely breaking RST - Refactored the logger parse structure
- 💥
ctx.editwill now edit component responses when not deferred
New Contributors
A huge thank you to @EdVraz for helping with a lot of the feature implementation of helper methods in the HTTPClient.
A thank you is in order for @LordOfPolls as well for guiding us with a clearer retry/lock logic concept in rate limiting.
Full Changelog: 4.0.1...4.0.2
4.0.1
What's Changed
- Options are now correctly processed under a subcommand or grouping.
4.0.0and other libraries now run on the same space with event loop gathering.- Select menu option JSON is now fixed when converted from the object scope.
- Log is no longer spammed with warnings about a dispatched
VOICE. - Components are able to be deferred correctly.
- Button label documentation is corrected.
- 💥BREAKING: Global commands are now able to synchronize and be registered.
- the
WebSocketfor gateway will now factor in jitter from latency and trigger a reconnection when the connection dies. - Embed JSON data for each attribute are now respectively written during conversion.
InteractionDatawill now recursively generates options when present for context.ctx.sendandctx.editnow share the same arguments and signature.memberandhoisted_roleare no longer missing fromMessageInteractionandGuildMemberrespectively.Embedtypeattribute is now more descriptive to its purpose.- Python 3.10 is now compatible.
@componentdecorator now supportscustom_idas a string-based argument.
New Contributors
- @MeidoNoHitsuji: #376
- @EdVraz: #382
Full Changelog: 4.0.0...4.0.1
4.0.0
Release 4.0.0
Library rewrite.
(The rewrite history is available at legacy-v3...stable.)
Miscellaneous
- Added strict type hinting on objects and attributes.
- NEW: Switch to new Read The Docs "Karma" theme.
- Moved to new documentation website: https://discord-interactions.rtfd.io/.
- 💥 NEW: Moved to new PyPI repository:
discord-py-interactions.
Please install by using
pip install -U discord-py-interactions!
v3 AND UNDER are now considered DEPRECATED.
discord-py-slash-commandwill no longer be updated.
Core/API
- 💥 NEW: Removed
discord.pyas a dependency.
This library is now a standalone library, which no longer needs a parent library such as
discord.py, Pycord, nextcord or any other related d.py fork. You will be able to interact
with the API and Gateway like these libraries do without needing to add them in your bot
in order to use ours.
- NEW: Introduced gateway
WebSocketconnection. - NEW: Introduced
HTTPClientrequester. - Revamped object callback logic to
Listenerdispatch. - NEW: Introduced
Cachestorage cache. - NEW: Added new objects to reflect API schema objects.
- NEW: Introduced new "dynamic object generation" workflow.
This works off of taking returned JSON as a dictionary in Python and transforming it
into an object with predefined attributes (__slots__) that represents an API schema
-strict object. These "data models" are able to give back a raw_jsonattribute for the
pure dictionary data, and a recursive representation of the serializer with the attributes
respectively.
Interactions
- Revamped objects for commands.
- NEW: Converted component usage into objects.
- Revamped and included new enumerables.
- NEW: Introduced dual-way decorator logic.
Decorators used to only work during the callback trigger of an interaction creation event
from the Gateway. This has been changed to now include command synchronization during
the "constructing" phase, as well as passing data later into the cache which can be accessed.
- Restored
*argsand**kwargsinvocation logic with dispatching events. - NEW: Introduced
ActionRow-less sending. - Revamped error handler reading as
Exception.
A huge thanks to also these contributors for helping with developing version 4.0 and building the library in the past:
@eunwoo1104
@LordOfPolls
@DeltaXWizard
@benwoo1110
@AnotherCat
@artem30801
3.0.3
3.0.2
Allow multiple context menus.
Allow multiple context menus