Releases: hikari-py/hikari
2.0.0.dev125
2.0.0.dev125 (2024-04-28)
Features
- Add monetization support. (#1803)
- Add missing link properties
- Add
message_link
property toMessageReference
- Add
channel_link
property toMessageReference
(#1877)
- Add
- Add missing
video_quality_mode
field toGuildStageChannel
(#1891) - Optimize gateway transport
- Merge cold path for zlib compression into main path to avoid additional call
- Handle data in
bytes
, rather than instr
to make good use of speedups (similar toRESTClient
) (#1898)
Bugfixes
2.0.0.dev124
2.0.0.dev124 (2024-04-07)
Features
- Improve
Emoji.parse
typing to make it more explicit (#1870) - Add ability to edit own user banner (#1871)
Bugfixes
- Fix incorrectly formatted error strings (#1866)
- Properly handle initial opcode as being RECONNECT (7) (#1867)
Documentation Improvements
- Replace mentions of
PRIVATE_MESSAGES
withDM_MESSAGES
(#1874)
2.0.0.dev123
2.0.0.dev123 (2024-03-31)
Breaking Changes
- Remove previously deprecated
Permissions.MANAGE_EMOJIS_AND_STICKERS
(#1762)
Features
- Allow subscribing to generic events (#1814)
- Allow changing guild features (community, etc.) (#1828)
- Improve embed parameters typing (#1841)
Bugfixes
- Fix
CommandInteractionOption.value
typehint not includingfloat
(#1805) Member.joined_at
is now nullable due to breaking API change- This will be received on guest members with temporary membership (#1812)
- Shard rate-limiters are now reset per websocket connection, avoiding a rare issue where a persistent network issue could allow the shard to be rate-limited (#1813)
Documentation Improvements
- Switch documentation to mkdocs (#1810)
2.0.0.dev122
2.0.0.dev122 (2023-11-18)
Deprecation
- Deprecate
Permissions.MANAGE_EMOJIS_AND_STICKERS
in favour ofPermissions.MANAGE_GUILD_EXPREASSIONS
(#1758)
Features
- Add Python 3.12 support. (#1357)
- Allow class listeners (#1661)
- Add missing
clear_x
methods toInteractionMessageBuilder
- This brings the functionality more in-line with other message edit APIs (#1740)
- Add missing permissions (#1758)
Bugfixes
- Fix optional connection "revoked" field KeyError when fetching connections. (#1720)
- Ensure shard connect and disconnect always get sent in pairs and properly waited for (#1744)
- Improve handing of force exiting a bot (double interrupt)
- Improve exception message
- Reset signal handlers to original ones after no longer capturing signals (#1745)
2.0.0.dev121
2.0.0.dev121 (2023-09-10)
Features
- Add
approximate_member_count
andapproximate_presence_count
toOwnGuild
. (#1659) - Add
CacheSettings.only_my_member
to only cache the bot member. (#1679) - Bots can now utilize
Activity.state
- When used with
type
set toActivityType.CUSTOM
, it will show as the text for the custom status.
Syntactic sugar also exists to support simply usingname
instead ofstate
. - Can be used with other activity types to provide additional information on the activity. (#1683)
- When used with
- Add missing Audit Log event types to
AuditLogEventType
(#1705) - Add
approximate_guild_count
field to ownApplication
(#1712)
Bugfixes
- Handle connection reset error on shards. (#1645)
- Retry REST requests on connection errors (#1648)
- Add support for text in stage channels (#1653)
- Fix incorrect calculation for the default avatar of migrated users (#1673)
- Fix attachments not being removed in message edits when
attachment
orattachments
isNone
(#1702)
2.0.0.dev120
2.0.0.dev120 (2023-06-08)
Breaking Changes
- Remove previously deprecated
hikari.impl.bot
module (#1612)
Deprecation
- Deprecate
User.discriminator
(#1631)
Features
- Implement voice messages (#1609)
- Implement username changes:
- Add
global_name
User.__str__()
respectsglobal_name
nowUser.default_avatar_url
returns correct URL for migrated accounts (#1631)
- Add
Bugfixes
2.0.0.dev119
2.0.0.dev119 (2023-05-08)
Breaking Changes
- Remove deprecated functionality for 2.0.0.dev119
- Removed
TextInputBuilder.required
in favour ofTextInputBuilder.is_required
. - Removed the ability to pass
CommandChoices
instead ofAutocompleteChoiceBuilders
when making autocomplete responses. (#1580)
- Removed
Bugfixes
- Fix
messages
argument typing forRESTClient.delete_messages
. (#1581) - Default
HTTPSettings.enable_cleanup_closed
toFalse
.- CPython3.11 changes around SSLProto have made this quite unstable and prone to errors when dealing with unclosed TLS transports, which ends up in aiohttp calling close and abort twice. (#1585)
Guild.get_channel
,Guild.get_emoji
,Guild.get_sticker
andGuild.get_role
now only return entries from the relevant guild. (#1608)
2.0.0.dev118
2.0.0.dev118 (2023-04-02)
Breaking Changes
-
Refactors to the component builder interfaces which make them flatter:
- Removed
add_to_container
fromButtonBuilder
,LinkButtonBuilder
,InteractiveButtonBuilder
,SelectMenuBuilder
,ChannelSelectMenuBuilder
, andTextInputBuilder
; these classes are no-longer generic and no-longer takecontainer
in their inits. - Replaced
TextSelectMenuBuilder.add_to_container
with theTextSelectMenuBuilder.parent
property.
This new property doesn't "finalise" the addition but rather just returns the parent object, or raises if the select menu is an orphan. This change also involves replacing thecontainer
parameter inTextSelectMenuBuilder.__init__
with an optionalparent
parameter. - Removed
SelectOptionBuilder.add_to_menu
; this class isn't generic anymore. TextSelectMenuBuilder.add_option
now takes all the option's configuration as parameters and returnsSelf
.- Split
MessageActionRowBuilder.add_button
into.add_interactive_button
and.add_link_button
.
These both now take all the button's configuration as parameters and returnSelf
. MessageActionRowBuilder.add_select_menu
now takes all the menu's configuration as parameters and returnsSelf
.
The new.add_channel_menu
and.add_text_menu
methods should be used for adding text and channel menus. Where.add_channel_menu
returnsSelf
and.add_text_menu
returns a text menu builder with aparent
property for getting back to the action row builder.ModalActionRowBuilder.add_text_input
now takes all the text input's configuration as parameters and returnsSelf
.min_length
andmax_length
can no-longer behikari.undefined.UNDEFINED
for the text input builder, and default to0
and4000
respectively. This change effects both the types accepted byModalActionRowBuilder.__init__
and the return types of the relevant properties.- Removed the
emoji_id
andemoji_name
parameters fromLinkButtonBuilder.__init__
, andInteractiveButtonBuilder.__init__
. - Removed the
style
andcustom_id
parameters fromLinkButtonBuilder.__init__
. - Removed the
url
parameter fromInteractiveButtonBuilder.__init__
. (#1533)
- Removed
-
Remove previously deprecated functionality:
Intents.GUILD_BANS
(deprecated alias forIntents.GUILD_MODERATION
)ComponentType.SELECT_MENU
(deprecated alias forIntents.TEXT_SELECT_MENU
)- Not passing type through
type
argument explicitly toMessageActionRowBuilder.add_select_menu
(#1535)
-
Renamed
StickerPack.banner_hash
toStickerPack.banner_asset_id
. (#1572)
Deprecation
- Renamed
TextInputBuilder.required
property toTextInputBuilder.is_required
. (#1533) - Passing
CommandChoice
s instead ofAutocompleteChoiceBuilder
s when making autocomplete responses. (#1539) hikari.impl.bot
moved tohikari.impl.gateway_bot
. (#1576)
Features
-
Role.mention
now returns"@everyone"
for the@everyone
role. (#1528) -
Refactors to the component builder interfaces which make them flatter:
hikari.undefined.UNDEFINED
can now be passed toTextInputBuilder.set_placeholder
andTextInputBuilder.set_value
.- The standard implementation of a select option builder is now exposed at
hikari.impl.special_endpoints.SelectOptionBuilder
. (#1533)
-
CommandChoice.name_localizations
field and separateAutocompleteChoiceBuilder
for use when making autocomplete responses. (#1539) -
Implement guild role subscriptions. (#1550)
-
Add
Role.is_guild_linked_role
. (#1551) -
hikari.iterators.LazyIterator.flatten
method for flattening a lazy iterator of synchronous iterables. (#1562) -
Support sending stickers when creating a message. (#1571)
-
Added several set methods for required values to the builders:
CommandBuilder.set_name
SlashCommandBuilder.set_description
InteractiveButtonBuilder.set_custom_id
SelectOptionBuilder.set_label
SelectOptionBuilder.set_value
SelectMenuBuilder.set_custom_id
(#1574)
Bugfixes
-
emoji=
can now be passed toLinkButtonBuilder.__init__
andInteractiveButtonBuilder.__init__
alone without causing serialization issues (and Pyright will now let you pass it). (#1533) -
Open
banner.txt
s withutf-8
encoding explicitly. (#1545) -
Pyright will now let you pass
role_mentions
anduser_mentions
toInteractionMessageBuilder.__init__
. (#1560) -
Fixed forum channel applied tags not being a sequence of snowflakes. (#1564)
-
Switch to using https://github.com/discord/twemoji for emoji images. (#1568)
-
Fixed sticker pack handling and typing:
- Fixed deserialization raising when
"banner_asset_id"
or"cover_sticker_id"
weren't included in the payload. StickerPack.banner_asset_id
is now correctly typed asOptional[Snowflake]
.StickerPack.banner_url
andStickerPack.make_banner_url
both now correctly returnNone
whenStickerPack.banner_asset_id
isNone
. (#1572)
- Fixed deserialization raising when
Bugfixes and QOL changes
2.0.0.dev117 (2023-03-06)
Breaking Changes
- Remove previously deprecated functionality:
delete_message_days
parameter forban
methods. (#1496)
type
can no-longer be specified while initialisehikari.impl.special_endpoints.TextSelectMenuBuilder
andhikari.impl.special_endpoints.ChannelSelectMenuBuilder
.
hikari.api.special_endpoints.SelectOptionBuilder
no-longer inherits fromhikari.api.special_endpoints.ComponentBuilder
(but it still has abuild
method). (#1509)
Features
- Pre-maturely fetch the public key if not present when starting an interaction server. (#1423)
- Add and document the new
SUPPRESS_NOTIFICATIONS
message flag. (#1504) hikari.impl.special_endpoints.ChannelSelectMenuBuilder
andhikari.impl.special_endpoints.TextSelectMenuBuilder
are now both exported directly onhikari.impl
. (#1508)type
property to the component builders. (#1509)- Traits now use
abc.abstractmethod
. This gives better type errors. (#1516) token_type
now defaults to"Bot"
when initialisingRESTBot
with a string token. (#1527)
Bugfixes
Selects V2, linked roles, guild audit log create event support and massive speedups!
2.0.0.dev116 (2023-02-06)
Breaking Changes
- Remove
RateLimitedError
in favour of always waiting on ratelimits. (#1441) - (#1455)
- Default logging to
sys.stdout
stream to bring more in-line with banner output. (#1485)
Deprecation
- Deprecate selects v1 functionality:
ComponentType.SELECT_MENU
->ComponentType.TEXT_SELECT_MENU
- Not passing
MessageActionRowBuilder.add_select_menu
'stype
argument explicitly. InteractionChannel
andResolvedOptionData
moved fromhikari.interactions.command_interactions
tohikari.interactions.base_interactions
. (#1455)
- Renamed
Intents.GUILD_BANS
toIntents.GUILD_MODERATION
. (#1471)
Features
- Add linked roles support (models + endpoints). (#1422)
- Add selects v2 components. (#1455)
- Added
fetch_self
,edit
,delete
,sync
, andcreate_guild
methods tohikari.templates.Template
. (#1457) - Add ability to suppress optimization warnings through
suppress_optimization_warning=True
to theGatewayBot
orRESTBot
constructors. (#1459) - Support GIF sticker image format (#1464)
- Add support for guild audit log entry create events. (#1471)
- Update
RESTClient.edit_channnel
to support settingapplied_tags
on forum threads. (#1474) - Implement
reply_must_exist
in create message methods (#1475) - Support loading files through
logging.config.fileConfig
ininit_logging
. (#1485) - Add
orjson
as an optional speedup and allow to pass customjson.dumps
andjson.loads
functions to all components. (#1486)
Bugfixes
- The global ratelimit now abides by
max_rate_limit
. (#1441) - Move
description_localizations
fromPartialCommand
toSlashCommand
(removing it fromContextMenuCommand
). (#1470) - Add missing fields to
GuildChannel.edit
. (#1474) - Fix
hikari.webhooks.ChannelFollowWebhook
not including source in all cases.source_channel
andsource_guild
will beNone
instead. (#1480)
- Fix colour logging not occurring on specific terminals (ie, Pycharm). (#1485)