From ee80448f8cb626d92023e4255802b747ce004666 Mon Sep 17 00:00:00 2001 From: "hikari-bot[bot]" <90276125+hikari-bot[bot]@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:10:34 +0000 Subject: [PATCH] Prepare for release of 2.0.0.dev118 (#1579) Co-authored-by: hikari-bot <90276125+hikari-bot[bot]@users.noreply.github.com> --- CHANGELOG.md | 69 +++++++++++++++++++++++++++++++++++++ changes/1528.feature.md | 1 - changes/1533.breaking.md | 16 --------- changes/1533.bugfix.md | 1 - changes/1533.deprecation.md | 1 - changes/1533.feature.md | 4 --- changes/1535.breaking.md | 4 --- changes/1539.deprecation.md | 1 - changes/1539.feature.md | 1 - changes/1545.bugfix.md | 1 - changes/1550.feature.md | 1 - changes/1551.feature.md | 1 - changes/1560.bugfix.md | 1 - changes/1562.feature.md | 1 - changes/1564.bugfix.md | 1 - changes/1568.bugfix.md | 1 - changes/1571.feature.md | 1 - changes/1572.breaking.md | 1 - changes/1572.bugfix.md | 5 --- changes/1574.feature.md | 8 ----- changes/1576.deprecation.md | 1 - hikari/_about.py | 2 +- 22 files changed, 70 insertions(+), 53 deletions(-) delete mode 100644 changes/1528.feature.md delete mode 100644 changes/1533.breaking.md delete mode 100644 changes/1533.bugfix.md delete mode 100644 changes/1533.deprecation.md delete mode 100644 changes/1533.feature.md delete mode 100644 changes/1535.breaking.md delete mode 100644 changes/1539.deprecation.md delete mode 100644 changes/1539.feature.md delete mode 100644 changes/1545.bugfix.md delete mode 100644 changes/1550.feature.md delete mode 100644 changes/1551.feature.md delete mode 100644 changes/1560.bugfix.md delete mode 100644 changes/1562.feature.md delete mode 100644 changes/1564.bugfix.md delete mode 100644 changes/1568.bugfix.md delete mode 100644 changes/1571.feature.md delete mode 100644 changes/1572.breaking.md delete mode 100644 changes/1572.bugfix.md delete mode 100644 changes/1574.feature.md delete mode 100644 changes/1576.deprecation.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ed00986a..0d393606b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,72 @@ +## 2.0.0.dev118 (2023-04-02) + +### Breaking Changes + +- Refactors to the component builder interfaces which make them flatter: + + * Removed `add_to_container` from `ButtonBuilder`, `LinkButtonBuilder`, `InteractiveButtonBuilder`, `SelectMenuBuilder`, `ChannelSelectMenuBuilder`, and `TextInputBuilder`; these classes are no-longer generic and no-longer take `container` in their inits. + * Replaced `TextSelectMenuBuilder.add_to_container` with the `TextSelectMenuBuilder.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 the `container` parameter in `TextSelectMenuBuilder.__init__` with an optional `parent` 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 returns `Self`. + * Split `MessageActionRowBuilder.add_button` into `.add_interactive_button` and `.add_link_button`. + These both now take all the button's configuration as parameters and return `Self`. + * `MessageActionRowBuilder.add_select_menu` now takes all the menu's configuration as parameters and returns `Self`. + The new `.add_channel_menu` and `.add_text_menu` methods should be used for adding text and channel menus. Where `.add_channel_menu` returns `Self` and `.add_text_menu` returns a text menu builder with a `parent` property for getting back to the action row builder. + * `ModalActionRowBuilder.add_text_input` now takes all the text input's configuration as parameters and returns `Self`. + * `min_length` and `max_length` can no-longer be `hikari.undefined.UNDEFINED` for the text input builder, and default to `0` and `4000` respectively. This change effects both the types accepted by `ModalActionRowBuilder.__init__` and the return types of the relevant properties. + * Removed the `emoji_id` and `emoji_name` parameters from `LinkButtonBuilder.__init__`, and `InteractiveButtonBuilder.__init__`. + * Removed the `style` and `custom_id` parameters from `LinkButtonBuilder.__init__`. + * Removed the `url` parameter from `InteractiveButtonBuilder.__init__`. ([#1533](https://github.com/hikari-py/hikari/issues/1533)) +- Remove previously deprecated functionality: + - `Intents.GUILD_BANS` (deprecated alias for `Intents.GUILD_MODERATION`) + - `ComponentType.SELECT_MENU` (deprecated alias for `Intents.TEXT_SELECT_MENU`) + - Not passing type through `type` argument explicitly to `MessageActionRowBuilder.add_select_menu` ([#1535](https://github.com/hikari-py/hikari/issues/1535)) +- Renamed `StickerPack.banner_hash` to `StickerPack.banner_asset_id`. ([#1572](https://github.com/hikari-py/hikari/issues/1572)) + +### Deprecation + +- Renamed `TextInputBuilder.required` property to `TextInputBuilder.is_required`. ([#1533](https://github.com/hikari-py/hikari/issues/1533)) +- Passing `CommandChoice`s instead of `AutocompleteChoiceBuilder`s when making autocomplete responses. ([#1539](https://github.com/hikari-py/hikari/issues/1539)) +- `hikari.impl.bot` moved to `hikari.impl.gateway_bot`. ([#1576](https://github.com/hikari-py/hikari/issues/1576)) + +### Features + +- `Role.mention` now returns `"@everyone"` for the `@everyone` role. ([#1528](https://github.com/hikari-py/hikari/issues/1528)) +- Refactors to the component builder interfaces which make them flatter: + + * `hikari.undefined.UNDEFINED` can now be passed to `TextInputBuilder.set_placeholder` and `TextInputBuilder.set_value`. + * The standard implementation of a select option builder is now exposed at `hikari.impl.special_endpoints.SelectOptionBuilder`. ([#1533](https://github.com/hikari-py/hikari/issues/1533)) +- `CommandChoice.name_localizations` field and separate `AutocompleteChoiceBuilder` for use when making autocomplete responses. ([#1539](https://github.com/hikari-py/hikari/issues/1539)) +- Implement guild role subscriptions. ([#1550](https://github.com/hikari-py/hikari/issues/1550)) +- Add `Role.is_guild_linked_role`. ([#1551](https://github.com/hikari-py/hikari/issues/1551)) +- `hikari.iterators.LazyIterator.flatten` method for flattening a lazy iterator of synchronous iterables. ([#1562](https://github.com/hikari-py/hikari/issues/1562)) +- Support sending stickers when creating a message. ([#1571](https://github.com/hikari-py/hikari/issues/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](https://github.com/hikari-py/hikari/issues/1574)) + +### Bugfixes + +- `emoji=` can now be passed to `LinkButtonBuilder.__init__` and `InteractiveButtonBuilder.__init__` alone without causing serialization issues (and Pyright will now let you pass it). ([#1533](https://github.com/hikari-py/hikari/issues/1533)) +- Open `banner.txt`s with `utf-8` encoding explicitly. ([#1545](https://github.com/hikari-py/hikari/issues/1545)) +- Pyright will now let you pass `role_mentions` and `user_mentions` to `InteractionMessageBuilder.__init__`. ([#1560](https://github.com/hikari-py/hikari/issues/1560)) +- Fixed forum channel applied tags not being a sequence of snowflakes. ([#1564](https://github.com/hikari-py/hikari/issues/1564)) +- Switch to using for emoji images. ([#1568](https://github.com/hikari-py/hikari/issues/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 as `Optional[Snowflake]`. + * `StickerPack.banner_url` and `StickerPack.make_banner_url` both now correctly return `None` when `StickerPack.banner_asset_id` is `None`. ([#1572](https://github.com/hikari-py/hikari/issues/1572)) + +--- + + ## 2.0.0.dev117 (2023-03-06) ### Breaking Changes diff --git a/changes/1528.feature.md b/changes/1528.feature.md deleted file mode 100644 index d0eb6116ff..0000000000 --- a/changes/1528.feature.md +++ /dev/null @@ -1 +0,0 @@ -`Role.mention` now returns `"@everyone"` for the `@everyone` role. diff --git a/changes/1533.breaking.md b/changes/1533.breaking.md deleted file mode 100644 index 31504d7441..0000000000 --- a/changes/1533.breaking.md +++ /dev/null @@ -1,16 +0,0 @@ -Refactors to the component builder interfaces which make them flatter: - -* Removed `add_to_container` from `ButtonBuilder`, `LinkButtonBuilder`, `InteractiveButtonBuilder`, `SelectMenuBuilder`, `ChannelSelectMenuBuilder`, and `TextInputBuilder`; these classes are no-longer generic and no-longer take `container` in their inits. -* Replaced `TextSelectMenuBuilder.add_to_container` with the `TextSelectMenuBuilder.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 the `container` parameter in `TextSelectMenuBuilder.__init__` with an optional `parent` 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 returns `Self`. -* Split `MessageActionRowBuilder.add_button` into `.add_interactive_button` and `.add_link_button`. - These both now take all the button's configuration as parameters and return `Self`. -* `MessageActionRowBuilder.add_select_menu` now takes all the menu's configuration as parameters and returns `Self`. - The new `.add_channel_menu` and `.add_text_menu` methods should be used for adding text and channel menus. Where `.add_channel_menu` returns `Self` and `.add_text_menu` returns a text menu builder with a `parent` property for getting back to the action row builder. -* `ModalActionRowBuilder.add_text_input` now takes all the text input's configuration as parameters and returns `Self`. -* `min_length` and `max_length` can no-longer be `hikari.undefined.UNDEFINED` for the text input builder, and default to `0` and `4000` respectively. This change effects both the types accepted by `ModalActionRowBuilder.__init__` and the return types of the relevant properties. -* Removed the `emoji_id` and `emoji_name` parameters from `LinkButtonBuilder.__init__`, and `InteractiveButtonBuilder.__init__`. -* Removed the `style` and `custom_id` parameters from `LinkButtonBuilder.__init__`. -* Removed the `url` parameter from `InteractiveButtonBuilder.__init__`. diff --git a/changes/1533.bugfix.md b/changes/1533.bugfix.md deleted file mode 100644 index 414a62387e..0000000000 --- a/changes/1533.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -`emoji=` can now be passed to `LinkButtonBuilder.__init__` and `InteractiveButtonBuilder.__init__` alone without causing serialization issues (and Pyright will now let you pass it). diff --git a/changes/1533.deprecation.md b/changes/1533.deprecation.md deleted file mode 100644 index a272d284fd..0000000000 --- a/changes/1533.deprecation.md +++ /dev/null @@ -1 +0,0 @@ -Renamed `TextInputBuilder.required` property to `TextInputBuilder.is_required`. diff --git a/changes/1533.feature.md b/changes/1533.feature.md deleted file mode 100644 index 329fa4fe67..0000000000 --- a/changes/1533.feature.md +++ /dev/null @@ -1,4 +0,0 @@ -Refactors to the component builder interfaces which make them flatter: - -* `hikari.undefined.UNDEFINED` can now be passed to `TextInputBuilder.set_placeholder` and `TextInputBuilder.set_value`. -* The standard implementation of a select option builder is now exposed at `hikari.impl.special_endpoints.SelectOptionBuilder`. diff --git a/changes/1535.breaking.md b/changes/1535.breaking.md deleted file mode 100644 index 6602a4ed7b..0000000000 --- a/changes/1535.breaking.md +++ /dev/null @@ -1,4 +0,0 @@ -Remove previously deprecated functionality: -- `Intents.GUILD_BANS` (deprecated alias for `Intents.GUILD_MODERATION`) -- `ComponentType.SELECT_MENU` (deprecated alias for `Intents.TEXT_SELECT_MENU`) -- Not passing type through `type` argument explicitly to `MessageActionRowBuilder.add_select_menu` diff --git a/changes/1539.deprecation.md b/changes/1539.deprecation.md deleted file mode 100644 index 8388087bc8..0000000000 --- a/changes/1539.deprecation.md +++ /dev/null @@ -1 +0,0 @@ -Passing `CommandChoice`s instead of `AutocompleteChoiceBuilder`s when making autocomplete responses. diff --git a/changes/1539.feature.md b/changes/1539.feature.md deleted file mode 100644 index 070da6819b..0000000000 --- a/changes/1539.feature.md +++ /dev/null @@ -1 +0,0 @@ -`CommandChoice.name_localizations` field and separate `AutocompleteChoiceBuilder` for use when making autocomplete responses. diff --git a/changes/1545.bugfix.md b/changes/1545.bugfix.md deleted file mode 100644 index c9932bd062..0000000000 --- a/changes/1545.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Open `banner.txt`s with `utf-8` encoding explicitly. diff --git a/changes/1550.feature.md b/changes/1550.feature.md deleted file mode 100644 index c326eed38e..0000000000 --- a/changes/1550.feature.md +++ /dev/null @@ -1 +0,0 @@ -Implement guild role subscriptions. diff --git a/changes/1551.feature.md b/changes/1551.feature.md deleted file mode 100644 index 264235fa1d..0000000000 --- a/changes/1551.feature.md +++ /dev/null @@ -1 +0,0 @@ -Add `Role.is_guild_linked_role`. diff --git a/changes/1560.bugfix.md b/changes/1560.bugfix.md deleted file mode 100644 index 7494e2579e..0000000000 --- a/changes/1560.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Pyright will now let you pass `role_mentions` and `user_mentions` to `InteractionMessageBuilder.__init__`. diff --git a/changes/1562.feature.md b/changes/1562.feature.md deleted file mode 100644 index a1899d2dcf..0000000000 --- a/changes/1562.feature.md +++ /dev/null @@ -1 +0,0 @@ -`hikari.iterators.LazyIterator.flatten` method for flattening a lazy iterator of synchronous iterables. diff --git a/changes/1564.bugfix.md b/changes/1564.bugfix.md deleted file mode 100644 index fbbf499b61..0000000000 --- a/changes/1564.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fixed forum channel applied tags not being a sequence of snowflakes. diff --git a/changes/1568.bugfix.md b/changes/1568.bugfix.md deleted file mode 100644 index 2075d0d2af..0000000000 --- a/changes/1568.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Switch to using for emoji images. diff --git a/changes/1571.feature.md b/changes/1571.feature.md deleted file mode 100644 index 0501b43432..0000000000 --- a/changes/1571.feature.md +++ /dev/null @@ -1 +0,0 @@ -Support sending stickers when creating a message. diff --git a/changes/1572.breaking.md b/changes/1572.breaking.md deleted file mode 100644 index 97a442cb01..0000000000 --- a/changes/1572.breaking.md +++ /dev/null @@ -1 +0,0 @@ -Renamed `StickerPack.banner_hash` to `StickerPack.banner_asset_id`. diff --git a/changes/1572.bugfix.md b/changes/1572.bugfix.md deleted file mode 100644 index c94172d37c..0000000000 --- a/changes/1572.bugfix.md +++ /dev/null @@ -1,5 +0,0 @@ -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 as `Optional[Snowflake]`. -* `StickerPack.banner_url` and `StickerPack.make_banner_url` both now correctly return `None` when `StickerPack.banner_asset_id` is `None`. diff --git a/changes/1574.feature.md b/changes/1574.feature.md deleted file mode 100644 index 96466240f1..0000000000 --- a/changes/1574.feature.md +++ /dev/null @@ -1,8 +0,0 @@ -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` diff --git a/changes/1576.deprecation.md b/changes/1576.deprecation.md deleted file mode 100644 index 659c43d3bc..0000000000 --- a/changes/1576.deprecation.md +++ /dev/null @@ -1 +0,0 @@ -`hikari.impl.bot` moved to `hikari.impl.gateway_bot`. diff --git a/hikari/_about.py b/hikari/_about.py index ec1d778971..71a3ee94ae 100644 --- a/hikari/_about.py +++ b/hikari/_about.py @@ -34,7 +34,7 @@ __copyright__: typing.Final[str] = "2021-present, davfsa" __coverage__: typing.Final[str] = "https://codeclimate.com/github/hikari-py/hikari" __discord_invite__: typing.Final[str] = "https://discord.gg/Jx4cNGG" -__docs__: typing.Final[str] = "https://docs.hikari-py.dev/en/master" +__docs__: typing.Final[str] = "https://docs.hikari-py.dev/en/2.0.0.dev118" __email__: typing.Final[str] = "davfsa@gmail.com" __issue_tracker__: typing.Final[str] = "https://github.com/hikari-py/hikari/issues" __license__: typing.Final[str] = "MIT"