ciffelia / koe

Discord 読み上げ Bot
MIT License
35 stars 15 forks source link

chore(deps): update rust crate serenity to 0.12.0 #135

Open renovate[bot] opened 11 months ago

renovate[bot] commented 11 months ago

This PR contains the following updates:

Package Type Update Change
serenity dependencies minor 0.11.7 -> 0.12.0

Release Notes

serenity-rs/serenity (serenity) ### [`v0.12.2`](https://redirect.github.com/serenity-rs/serenity/blob/HEAD/CHANGELOG.md#0122---2024-06-01) [Compare Source](https://redirect.github.com/serenity-rs/serenity/compare/v0.12.1...v0.12.2) Thanks to the following for their contributions: - \[[@​bend-n](https://redirect.github.com/bend-n)] - \[[@​GnomedDev](https://redirect.github.com/GnomedDev)] - \[[@​jamesbt365](https://redirect.github.com/jamesbt365)] - \[[@​MidSpike](https://redirect.github.com/MidSpike)] - \[[@​mkrasnitski](https://redirect.github.com/mkrasnitski)] - \[[@​RegenJacob](https://redirect.github.com/RegenJacob)] ##### Deprecations Continuing with the deprecations started in 0.12.1, many more methods and fields have been deprecated in order to make an easier upgrade path to 0.13. These deprecation messages include a migration path, it is recommended to go one by one using `cargo check` and migrate each warning to reduce the burden migrating to 0.13. Following is a list of the deprecation PRs and the justification for these changes. - ([#​2791](https://redirect.github.com/serenity-rs/serenity/pull/2791)) The `Channel::is_nsfw` method was wrong, useless, and served better by `GuildChannel::nsfw` - ([#​2794](https://redirect.github.com/serenity-rs/serenity/pull/2794)) These cache methods needed arcane borrow checker dances internally, and obscure the simplicity of the cache. - ([#​2816](https://redirect.github.com/serenity-rs/serenity/pull/2816)) `Member::highest_role_info` is now strictly less powerful than the new `Guild::member_highest_role` and can avoid a cache lookup if used correctly. - ([#​2825](https://redirect.github.com/serenity-rs/serenity/pull/2825)) - - `Guild::is_large` is less accurate than `Guild::large` - - `Message::is_own` is super simple to implement yourself - - `Message::is_private` simply checks if `Message::guild_id` is `none`. - ([#​2838](https://redirect.github.com/serenity-rs/serenity/pull/2838)) `Event::PresencesReplace` does not exist, and is a relic from when serenity supported user accounts. - ([#​2861](https://redirect.github.com/serenity-rs/serenity/pull/2861)) `TeamMember::permissions` is always `["*"]`, so is useless. ##### Other notable changes - ([#​2790](https://redirect.github.com/serenity-rs/serenity/pull/2790])) Added `CreateMessage::enforce_nonce`, to prevent sending duplicate messages. - ([#​2801](https://redirect.github.com/serenity-rs/serenity/pull/2801)) Added `EditProfile::banner`, allowing banners to be set for bots. - ([#​2810](https://redirect.github.com/serenity-rs/serenity/pull/2810)) Added `ChannelId::get_thread_member`. - ([#​2812](https://redirect.github.com/serenity-rs/serenity/pull/2812)) Added `Guild::partial_member_permissions_in`, which can be used to avoid fetching a `Member` in message events just to check permissions. - ([#​2819](https://redirect.github.com/serenity-rs/serenity/pull/2819)) Added `From` for `CreateEmbedAuthor`, setting the author name and icon to the `User`'s info. - ([#​2813](https://redirect.github.com/serenity-rs/serenity/pull/2813)) Added `UserId::direct_message`, so you don't need a full `User` to direct message. - ([#​2834](https://redirect.github.com/serenity-rs/serenity/pull/2834)) Added `Http::default_allowed_mentions` to set the `AllowedMentions` to be used with every request. - ([#​2830](https://redirect.github.com/serenity-rs/serenity/pull/2830)) Added `Guild`(`Id`)`::bulk_ban`, allowing bulk banning without hitting rate limits. - ([#​2836](https://redirect.github.com/serenity-rs/serenity/pull/2836)) Added support for **Message Polls**, including reading and sending them. - ([#​2807](https://redirect.github.com/serenity-rs/serenity/pull/2807)) Added support for **User Apps**, alllowing user-installable application commands. - ([#​2882](https://redirect.github.com/serenity-rs/serenity/pull/2882)) Added support for super reactions. - Many documentation fixes and other optimisations to improve memory and CPU usage. ### [`v0.12.1`](https://redirect.github.com/serenity-rs/serenity/blob/HEAD/CHANGELOG.md#0121---2024-02-28) [Compare Source](https://redirect.github.com/serenity-rs/serenity/compare/v0.12.0...v0.12.1) Thanks to the following for their contributions: - \[[@​arqunis](https://redirect.github.com/arqunis)] - \[[@​GnomedDev](https://redirect.github.com/GnomedDev)] - \[[@​jamesbt365](https://redirect.github.com/jamesbt365)] - \[[@​kangalio](https://redirect.github.com/kangalio)] - \[[@​logand22](https://redirect.github.com/logand22)] - \[[@​mkrasnitski](https://redirect.github.com/mkrasnitski)] - \[[@​SenseiHiraku](https://redirect.github.com/SenseiHiraku)] - \[[@​vaporoxx](https://redirect.github.com/vaporoxx)] - \[[@​vidhanio](https://redirect.github.com/vidhanio)] - \[[@​Xaeroxe](https://redirect.github.com/Xaeroxe)] - \[[@​yanorei32](https://redirect.github.com/yanorei32)] ##### Notable changes In this release, **the standard framework has been deprecated** ([#​2733](https://redirect.github.com/serenity-rs/serenity/pull/2733)). As Discord continues to endorse and evolve application commands (`/...` commands, user commands, message commands, etc.), the standard framework becomes increasingly outdated. Bots are also steadily losing (and already have lost) access to contents of messages, making it difficult to build a prefix-only bot. Unless you plan on restricting your bot to only accept commands in DMs, allowing its presence in only fewer than 100 guilds, or presenting a reasonable justification to Discord for permission to continue using message contents, you should migrate to application commands. We recommend [poise](https://redirect.github.com/serenity-rs/poise), which supports writing both prefix and application commands with a `#[command]` macro like the standard framework. ##### Why not just update the framework? Poise already exists and is better than the standard framework. Efforts should be directed at improving poise instead. To support application commands would require an overhaul of the standard framework, as they are special (for instance, Discord parses arguments on behalf of the bot and passes them as structured data, whereas for prefix commands, the bot must parse by itself). ##### Smaller, but still notable changes - ([#​2621](https://redirect.github.com/serenity-rs/serenity/pull/2621)) Add a temporary cache for messages. - ([#​2649](https://redirect.github.com/serenity-rs/serenity/pull/2649)) Deprecate `RoleId::to_role_cached` - Use `Guild::roles` instead. - ([#​2726](https://redirect.github.com/serenity-rs/serenity/pull/2726)) Pack bitflags - Reduces alignments of `bitflags!` types, resulting in a smaller memory footprint. - ([#​2696](https://redirect.github.com/serenity-rs/serenity/pull/2696)) Support attachments in forum posts. - ([#​2560](https://redirect.github.com/serenity-rs/serenity/pull/2560)) Add support for monetization APIs. - ([#​2648](https://redirect.github.com/serenity-rs/serenity/pull/2648)) Deprecate inefficient Emoji helpers - Use the emoji methods on `GuildId`/`Guild` instead. ### [`v0.12.0`](https://redirect.github.com/serenity-rs/serenity/blob/HEAD/CHANGELOG.md#0120---2023-11-27) [Compare Source](https://redirect.github.com/serenity-rs/serenity/compare/v0.11.7...v0.12.0) This release turned out to be one of serenity's largest ever, with well over 300 PRs in total! It contains quite a few major breaking changes to the API. Therefore, the changelog for this release also serves as a migration guide for users upgrading from the 0.11 series. Thanks to the following for their contributions: - \[[@​arqunis](https://redirect.github.com/arqunis)] - \[[@​alakhpc](https://redirect.github.com/alakhpc)] - \[[@​AngelOnFira](https://redirect.github.com/AngelOnFira)] - \[[@​Bloectasy](https://redirect.github.com/Bloectasy)] - \[[@​campbellcole](https://redirect.github.com/campbellcole)] - \[[@​cheesycod](https://redirect.github.com/cheesycod)] - \[[@​crivasr](https://redirect.github.com/crivasr)] - \[[@​darkyeg](https://redirect.github.com/darkyeg)] - \[[@​fenhl](https://redirect.github.com/fenhl)] - \[[@​GnomedDev](https://redirect.github.com/GnomedDev)] - \[[@​jamesbt365](https://redirect.github.com/jamesbt365)] - \[[@​Joshument](https://redirect.github.com/Joshument)] - \[[@​kangalio](https://redirect.github.com/kangalio)] - \[[@​Kneemund](https://redirect.github.com/Kneemund)] - \[[@​LaytonGB](https://redirect.github.com/LaytonGB)] - \[[@​marcantoinem](https://redirect.github.com/marcantoinem)] - \[[@​Miezhiko](https://redirect.github.com/Miezhiko)] - \[[@​Milo123459](https://redirect.github.com/Milo123459)] - \[[@​mkrasnitski](https://redirect.github.com/mkrasnitski)] - \[[@​nickelc](https://redirect.github.com/nickelc)] - \[[@​oSumAtrIX](https://redirect.github.com/oSumAtrIX)] - \[[@​Ruthenic](https://redirect.github.com/Ruthenic)] - \[[@​Sergiovan](https://redirect.github.com/Sergiovan)] - \[[@​skreborn](https://redirect.github.com/skreborn)] - \[[@​StckOverflw](https://redirect.github.com/StckOverflw)] - \[[@​tatsuya6502](https://redirect.github.com/tatsuya6502)] - \[[@​tazz4843](https://redirect.github.com/tazz4843)] - \[[@​vaporoxx](https://redirect.github.com/vaporoxx)] - \[[@​Xaeroxe](https://redirect.github.com/Xaeroxe)] ##### Builders The closure-based API for constructing requests using the builder pattern has been ripped out and replaced. In place of closures, users must now pass in builder types directly. For example, in serenity 0.11, code like the following was very common: ```rust let channel = guild .create_channel(&http, |c| c.name("my-test-channel").kind(ChannelType::Text)) .await?; ``` Now, users instead write the following code: ```rust let builder = CreateChannel::new("my-test-channel").kind(ChannelType::Text); let channel = guild.create_channel(&http, builder).await?; ``` Or, inline like so: ```rust let channel = guild .create_channel(&http, CreateChannel::new("my-test-channel").kind(ChannelType::Text)) .await?; ``` Note that in this particular example, the channel name is now a mandatory field that must be passed in when constructing the builder. Mutating the builder with subsequent calls to `CreateChannel::name` will change the underlying value. Additionally, all methods on builders now take `mut self` and return `Self`, instead of taking and returning `&mut self`/`&mut Self`. This allows for explicit construction as in the second example above. Also, builders no longer wrap a `pub HashMap<&'static str, T>`; the hashmap has been flattened into concrete private fields. Some benefits to this new approach to builders are: 1. Because every closure has a type unique to it, each call to a method taking a closure would be monomorphized separately, resulting in binary bloat. This is no longer the case. 2. Builders can be constructed once and then cloned and re-used multiple times. 3. Enforcement of field requirements (as dictated by the Discord API docs) provides compile-time request validation. ##### Attachments - The `AttachmentType` enum has been replaced with a `CreateAttachment` builder struct. This struct has the `file`, `path`, and `url` constructors that eagerly evaluate the data passed to them - `CreateAttachment` simply stores the resulting raw data. This is in contrast to `AttachmentType` which lazily carried filepaths/urls with it, and had `data` and `filename` methods for resolving them. Additionally, the `CreateAttachment::to_base64` method can be used to manually encode an attachment if needed. - A new `EditAttachments` builder struct has been added for use with the `attachments` method on the `EditMessage`, `EditWebhookMessage`, and `EditInteractionResponse` builders. This new builder provides finer control when editing a message's existing attachments or uploading additional ones. Also, the following methods have been renamed to more accurately reflect their behavior: | serenity v0.11 | serenity v0.12 | | --- | --- | | `EditMessage::attachment` | `EditMessage::new_attachment` | | `EditMessage::add_existing_attachment` | `EditMessage::keep_existing_attachment` | | `EditWebhookMessage::clear_existing_attachments` | `EditWebhookMessage::clear_attachments` | | `EditInteractionResponse::clear_existing_attachments` | `EditInteractionResponse::clear_attachments` | ##### Collectors Collectors have been redesigned and simplified at no cost to expressibility. There is now a generic `collector::collect` function which takes a closure as argument, letting you filter events as they stream in. - The specific collectors (`ComponentInteractionCollector`, `ModalInteractionCollector`, `MessageCollector`, and `ReactionCollector`) are simply convenience structs that wrap this underlying function. - `EventCollector` is now deprecated, as its use usually involved anti-patterns around fallibility. However, its functionality can still be replicated using `collector::collect`. See [example 10](https://redirect.github.com/serenity-rs/serenity/blob/6ce990c79e893bbaa629d83527200d98330274a2/examples/e10\_collectors/src/main.rs) for more details. - The `RelatedId` and `RelatedIdsForEventType` types have been removed as they were only used by `EventCollector`. Methods for retrieving them from events have also been removed; if users wish to extract "related" ids from an event, they should do so directly from the event's fields. The removed methods are the following: - `Event::user_id` - `Event::guild_id` - `Event::channel_id` - `Event::message_id` - `EventType::related_ids` ##### Commands In an effort to shorten long names and make import paths less unwieldy, Serenity now uses `command` instead of `application_command` in all places, except for the `Permissions::USE_APPLICATION_COMMANDS` constant. This includes methods on the `Http`, `GuildId`, `Guild`, `PartialGuild`, and `Command` types, as well as a few other miscellaneous places: | serenity v0.11 | serenity v0.12 | | --- | --- | | `Http::*_{global,guild}_application_command*` | `Http::*_{global,guild}_command*` | | `{GuildId,Guild,PartialGuild}::*_application_command*` | `{GuildId,Guild,PartialGuild}::*_command*` | | `Command::*_global_application_command*` | `Command::*_global_command*` | | `Interaction::application_command` | `Interaction::command` | | `EventHandler::application_command_permissions_update` | `EventHandler::command_permissions_update` | | `Route::ApplicationCommand*` | `Route::Command*` | | `Permissions::use_application_commands` | `Permissions::use_commands` | Additionally, the following command types have been renamed: | serenity v0.11 | serenity v0.12 | | --- | --- | | `CreateApplicationCommand` | `CreateCommand` | | `CreateApplicationCommandOption` | `CreateCommandOption` | | `CreateApplicationCommandPermissionData` | `CreateCommandPermission` | | `CreateApplicationCommandPermissionsData` | `EditCommandPermissions` | | `CommandPermission` | `CommandPermissions` | | `CommandPermissionData` | `CommandPermission` | Furthermore, the methods on `CreateCommandPermission`, such as `new`, `kind`, etc. have been replaced with constructors for each type of permission, e.g. `role`, `user`, `channel`, etc., to avoid a possible mismatch between `kind` and the id that gets passed in. Finally, the `{GuildId,Guild,PartialGuild}::create_command_permission` method has been renamed to `edit_command_permission` to more accurately reflect its behavior. ##### Cache - Cache methods now return a `CacheRef` type that wraps a reference into the cache. Other methods that returned a map, now return a wrapper type around a reference to the map, with a limited API to prevent accidental deadlocks. This all helps reduce the number of clones when querying the cache. Those wishing to replicate the old behavior can simply call `.clone()` on the return type to obtain the wrapped data. - `CacheSettings` has new fields `time_to_live`, `cache_guilds`, `cache_channels`, and `cache_users`, allowing cache configuration on systems with memory requirements; whereas previously, memory-constrained systems were forced to disable caching altogether. - Caching for `PrivateChannel`s (aka DM channels) has been removed, as they are never sent across the gateway by Discord. Therefore, the `Cache::{private_channel, private_channels}` methods have been removed, and `Cache::guild_channel` has been renamed to just `Cache::channel`. Additionally, some uses of the `Channel` enum in return types have been replaced with either `GuildChannel` or `PrivateChannel` as seen fit. ##### IDs All `*Id` types have had their internal representations made private. Therefore, the API has changed as follows: | serenity v0.11 | serenity v0.12 | | --- | --- | | `ExampleId(12345)` | `ExampleId::new(12345)` | | `example_id.as_u64()` | `example_id.get()` | Note that all `*Id` types now implement `Into` and `Into`. Additionally, attempting to instantiate an id with a value of `0` will panic. Also, the implementations of `FromStr` for the `UserId`, `RoleId`, and `ChannelId` types now expect an integer rather than a mention string. The following table shows the new expected input strings: | | serenity v0.11 | serenity v0.12 | | --- | --- | --- | | `ChannelId` | `<#​81384788765712384>` | `81384788765712384` | | `RoleId` | `<@​&136107769680887808>` | `136107769680887808` | | `UserId` | `<@​114941315417899012>` or `<@​!114941315417899012>` | `114941315417899012` | Users wishing to parse mentions should either parse into a `Mention` object, or use the `utils::{parse_user_mention, parse_role_mention, parse_channel_mention}` methods. ##### Interactions The various interaction types have been renamed as follows: | serenity v0.11 | serenity v0.12 | | --- | --- | | `ApplicationCommandInteraction` | `CommandInteraction` | | `MessageComponentInteraction` | `ComponentInteraction` | | `ModalSubmitInteraction` | `ModalInteraction` | Method names on interaction types have been shortened in the following way: | serenity v0.11 | serenity v0.12 | | --- | --- | | `create_interaction_response` | `create_response` | | `create_followup_message` | `create_followup` | | `delete_original_interaction_response` | `delete_response` | | `delete_followup_message` | `delete_followup` | | `edit_original_interaction_response` | `edit_response` | | `edit_followup_message` | `edit_followup` | | `get_interaction_response` | `get_response` | | `get_followup_message` | `get_followup` | - `AutocompleteInteraction` has been merged into `CommandInteraction`, along with its corresponding methods. - The `kind` field has been removed from each of the interaction structs. - A `quick_modal` method has been added to `CommandInteraction` and `ComponentInteraction`. See the docs for more details. ##### Framework The standard framework is now configurable at runtime, as the `configure` method now takes `self` by reference. In line with the builder changes, the `Configuration` and `BucketBuilder` builders are no longer closure-based and must be passed in directly. Also, the `Framework` trait has been reworked to accomodate more use cases than just text commands: - The `dispatch` method now takes a `FullEvent` as argument instead of just a `Message`. This enum contains all the data that is passed to the `EventHandler`. - An optional `init` method has been added, that allows for more complex framework initialization, which can include executing HTTP requests, or accessing cache or shard data. As a result, the trait now accomodates alternative frameworks more easily, such as [poise](https://redirect.github.com/serenity-rs/poise). ##### Gateway - Renamed `WsStream` to `WsClient`. - The `ShardManagerMonitor` and `ShardManagerMessage` types have been removed. Their functionality has been replicated via methods directly on `ShardManager`. Any fields with type `Sender`, as well as the `Client::shard_manager` field, have had their types changed to `Arc`. The new methods on `ShardManager` are the following: - `return_with_value` - `shutdown_finished` - `restart_shard` - `update_shard_latency_and_stage` - The `ShardClientMessage` and `InterMessage` enums were deemed redundant wrappers around `ShardRunnerMessage` and removed - users should use `ShardRunnerMessage` directly instead. - The `ShardManagerError` type is removed in favor of `GatewayError`. - Serenity's handling of gateway heartbeats has been made more accurate and type safe as follows: - Removed `Shard::heartbeat_instants`. Users should instead use the `last_heartbeat_{sent,ack}` methods, which now return `Option` instead of `Option<&Instant>`. - Changed `Shard::heartbeat_interval` to return `Option` instead of `Option`. - Rename `Shard::check_heartbeat` to `do_heartbeat`. - `ShardMessenger::new` now takes `&ShardRunner` as argument instead of `Sender`. - Removed the `ShardRunnerMessage::AddCollector` variant in favor of the `ShardMessenger::add_collector` method. This method adds the collectors immediately, whereas `ShardRunnerMessage` is polled periodically in a loop - this could occasionally cause collectors to drop the first event they received. - All remaining types found at `serenity::client::bridge::{gateway,voice}::*` have been moved into `serenity::gateway`. They are now gated behind the `gateway` feature instead of the `client` feature, however most users use these features in conjunction, and so should not see a change in required-enabled features. ##### MSRV Serenity now uses Rust edition 2021, with an MSRV of Rust 1.74. ##### Miscellaneous ##### Added - [#​1923](https://redirect.github.com/serenity-rs/serenity/pull/1923), [#​2465](https://redirect.github.com/serenity-rs/serenity/pull/2465) - Add a `thread_id` parameter to `Http::{get,edit,delete}_webhook_message`, `Http::execute_webhook}`, as well as `Webhook::{get,delete}_message`. - [#​2104](https://redirect.github.com/serenity-rs/serenity/pull/2104), [#​2105](https://redirect.github.com/serenity-rs/serenity/pull/2105) - Add an `audit_log_reason` parameter to many `Http` methods and builder structs. - [#​2164](https://redirect.github.com/serenity-rs/serenity/pull/2164) - Add `EventHandler::shards_ready` method. - [#​2186](https://redirect.github.com/serenity-rs/serenity/pull/2186), [#​2201](https://redirect.github.com/serenity-rs/serenity/pull/2201) - Add support for having a bot interactions endpoint URL. - [#​2215](https://redirect.github.com/serenity-rs/serenity/pull/2215) - Implement `Default` for many model types. - [#​2233](https://redirect.github.com/serenity-rs/serenity/pull/2233) - Add `button` and `select_menu` methods to the following builders: - `CreateInteractionResponseMessage` - `CreateInteractionResponseFollowup` - `EditInteractionResponse` - `CreateMessage` - `EditMessage` - `EditWebhookMessage` - `ExecuteWebhook` - [#​2247](https://redirect.github.com/serenity-rs/serenity/pull/2247), [#​2357](https://redirect.github.com/serenity-rs/serenity/pull/2357), [#​2385](https://redirect.github.com/serenity-rs/serenity/pull/2385) - Add support for forum channels and creating forum posts using `ChannelId::create_forum_post` and `GuildChannel::create_forum_post`. - [#​2257](https://redirect.github.com/serenity-rs/serenity/pull/2257) - Add support for multiple event handlers by replacing the `event_handler` and `raw_event_handler` fields with pluralized `event_handlers` and `raw_event_handlers` in the following structs: - `ShardManagerOptions` - `ShardQueuer` - `ShardRunner` - `ShardRunnerOptions` - `ClientBuilder` - [#​2273](https://redirect.github.com/serenity-rs/serenity/pull/2273), [#​2367](https://redirect.github.com/serenity-rs/serenity/pull/2367) - Add events `ReactionRemoveEmoji` and `GuildAuditLogEntryCreate`. - [#​2276](https://redirect.github.com/serenity-rs/serenity/pull/2276) - Add support for automod regex patterns. - [#​2297](https://redirect.github.com/serenity-rs/serenity/pull/2297) - Add the `serenity::all` module, which re-exports most public items in the crate. - [#​2336](https://redirect.github.com/serenity-rs/serenity/pull/2336) - Add a `CreateButton::custom_id` method. - [#​2369](https://redirect.github.com/serenity-rs/serenity/pull/2369) - Add support for editing a guild's MFA level using `{GuildId, Guild, PartialGuild}::edit_mfa_level`. - [#​2391](https://redirect.github.com/serenity-rs/serenity/pull/2391) - Add attachments support to the `EditWebhookMessage` endpoint by adding a `new_attachments` parameter to `Http::edit_webhook_message`, as well as the following methods to the `EditWebhookMessage` builder: - `attachment` - `add_existing_attachment` - `remove_existing_attachment` - [#​2415](https://redirect.github.com/serenity-rs/serenity/pull/2415), [#​2461](https://redirect.github.com/serenity-rs/serenity/pull/2461) - Add support for Discord's new usernames by adding the `User::global_name` field, and by making discriminators on usernames optional and non-zero. In particular, the `PresenceUser::discriminator` and `User::discriminator` fields are now of type `Option`. - [#​2487](https://redirect.github.com/serenity-rs/serenity/pull/2487) - Add support for the Get Current User Guild Member endpoint with the `{GuildId,Guild,PartialGuild}::current_user_member` method. - [#​2503](https://redirect.github.com/serenity-rs/serenity/pull/2503) - Add support for setting custom activity statuses. - [#​2520](https://redirect.github.com/serenity-rs/serenity/pull/2520) - Add the `User::static_face` method, mirroring `User::face`. - [#​2535](https://redirect.github.com/serenity-rs/serenity/pull/2535) - Add pagination support to the Get Guild Bans endpoint. - [#​2565](https://redirect.github.com/serenity-rs/serenity/pull/2565) - Add support for the `VOICE_CHANNEL_STATUS_UPDATE` gateway event. - [#​2576](https://redirect.github.com/serenity-rs/serenity/pull/2576) - Add a `GuildId::everyone_role` method. - [#​2588](https://redirect.github.com/serenity-rs/serenity/pull/2588) - Add audit log events for creator monetization. - [#​2595](https://redirect.github.com/serenity-rs/serenity/pull/2595) - Add the `CREATE_EVENTS` and `CREATE_GUILD_EXPRESSIONS` permissions, and rename `MANAGE_EMOJIS_AND_STICKERS` to `MANAGE_GUILD_EXPRESSIONS` (the old name is still present but deprecated). - [#​2600](https://redirect.github.com/serenity-rs/serenity/pull/2600) - Add the `FormattedTimestamp` utility struct for representing a combination of a timestamp and a formatting style. - [#​2601](https://redirect.github.com/serenity-rs/serenity/pull/2601) - Add support for more Discord subdomains in `utils::argument_convert::parse_message_url`. - [#​2614](https://redirect.github.com/serenity-rs/serenity/pull/2614) - Add `Hash` to `Timestamp`'s derive list. - [#​2592](https://redirect.github.com/serenity-rs/serenity/pull/2592) - Add experimental `typesize` support. - [#​2618](https://redirect.github.com/serenity-rs/serenity/pull/2618) - Implement `From>` for `AutocompleteChoice`. ##### Changed - [#​1896](https://redirect.github.com/serenity-rs/serenity/pull/1896) - `Request::body_ref` now returns `Option<&T>` instead of `&Option<&T>`. - [#​1897](https://redirect.github.com/serenity-rs/serenity/pull/1897), [#​2350](https://redirect.github.com/serenity-rs/serenity/pull/2350) - `Typing::stop` now returns `bool` instead of `Option<()>`. Also, `Typing::start` and any wrapper methods are now infallible. - [#​1922](https://redirect.github.com/serenity-rs/serenity/pull/1922), [#​1940](https://redirect.github.com/serenity-rs/serenity/pull/1940), [#​2090](https://redirect.github.com/serenity-rs/serenity/pull/2090) - The following methods are no longer `async`: - `ChannelId::name` - `Context::*` - `Guild::{members_starting_with, members_containing, members_username_containing, members_nick_containing}` - `Guild::default_channel` - `PartialGuild::greater_member_hierarchy` - `ShardManager::new` - `UserId::to_user_cached` - [#​1929](https://redirect.github.com/serenity-rs/serenity/pull/1929) - Unbox the `Error::Http` variant. - [#​1934](https://redirect.github.com/serenity-rs/serenity/pull/1934) - Change `Guild::member` to return `Cow<'_, Member>` instead of just `Member`. - [#​1937](https://redirect.github.com/serenity-rs/serenity/pull/1937) - Change all fields of `ShardManagerOptions` to be owned (`Arc` is cheap to clone). - [#​1947](https://redirect.github.com/serenity-rs/serenity/pull/1947) - Change methods related to pruning to take and return `u8`. - [#​1963](https://redirect.github.com/serenity-rs/serenity/pull/1963) - Change `RequestBuilder::body` from `Option<&[u8]>` to `Option>`. - [#​1976](https://redirect.github.com/serenity-rs/serenity/pull/1976) - Make `MessageInteraction` non-exhaustive, and add a `member` field. - [#​1977](https://redirect.github.com/serenity-rs/serenity/pull/1977) - Rename `Permissions::USE_SLASH_COMMANDS` to `USE_APPLICATION_COMMANDS`. - [#​1980](https://redirect.github.com/serenity-rs/serenity/pull/1980) - Rename `constants::OpCode` to `Opcode`, and the same for `voice_model::OpCode`. - [#​1984](https://redirect.github.com/serenity-rs/serenity/pull/1984) - Introduce `ShardInfo` for tracking Shard ids, and change ids from `u64` to `u32`. - [#​1990](https://redirect.github.com/serenity-rs/serenity/pull/1990) - Change the `Message::nonce` field to a custom `Nonce` enum instead of a `serde_json::Value`. - [#​1999](https://redirect.github.com/serenity-rs/serenity/pull/1999) - Make `MembershipState`, `ScheduledEventStatus`, and `ScheduledEventType` non-exhaustive. - [#​2005](https://redirect.github.com/serenity-rs/serenity/pull/2005) - Change `MessageActivityKind` variants to use CamelCase instead of ALL_CAPS. - [#​2007](https://redirect.github.com/serenity-rs/serenity/pull/2007), [#​2018](https://redirect.github.com/serenity-rs/serenity/pull/2018) - Rework presence setting and storing as follows: - Replace `CurrentPresence` with a `PresenceData` struct. - Use `ActivityData` in place of `Activity` for setting the current presence. - Change the various `set_activity` methods to take an `Option` to allow for clearing the current presence by passing in `None`. - Add support for setting a presence when first identifying to the gateway by adding presence methods to `ClientBuilder`, and adding an optional `presence` parameter to `Shard::new`. - [#​2008](https://redirect.github.com/serenity-rs/serenity/pull/2008) - Unknown values for enum variants are now preserved for debugging purposes. Any `Unknown` variants on enums are now changed to `Unknown(u8)`. Also, the `num` method for those enums is removed; users should call `u8::from` instead. - [#​2017](https://redirect.github.com/serenity-rs/serenity/pull/2017) - Change `Member::edit` to edit in place, and return `Result<()>` instead of `Result`. - [#​2023](https://redirect.github.com/serenity-rs/serenity/pull/2023), [#​2170](https://redirect.github.com/serenity-rs/serenity/pull/2170), [#​2459](https://redirect.github.com/serenity-rs/serenity/pull/2459) - Use Id types everywhere instead of `u32`, `u64`, or `NonZeroU64`. - [#​2030](https://redirect.github.com/serenity-rs/serenity/pull/2030) - Change `{GuildId, Guild, PartialGuild}::delete` to return `Result<()>`. - [#​2032](https://redirect.github.com/serenity-rs/serenity/pull/2032) - Replace `impl From for Timestamp` with `impl TryFrom<&str>`. - [#​2047](https://redirect.github.com/serenity-rs/serenity/pull/2047) - The following functions are now `const`: - `LightMethod::reqwest_method` - `Ratelimit::{limit, remaining, reset, reset_after}` - `RequestBuilder::new` - `Channel::{id, position, name}` - `Error::is_cache_err` - `Event::event_type` - `EventType::name` - `GatewayIntents::*` - `Permissions::*` - [#​2052](https://redirect.github.com/serenity-rs/serenity/pull/2052) - Change the `CommonFilterOptions::{filter_limit, collect_limit}` fields from `u32` to `NonZeroU32`. - [#​2054](https://redirect.github.com/serenity-rs/serenity/pull/2054) - Change the `GuildChannel::message_count` field from `Option` to `Option`. - [#​2073](https://redirect.github.com/serenity-rs/serenity/pull/2073) - Move the `serenity::utils::colour` module into `serenity::model`. - [#​2127](https://redirect.github.com/serenity-rs/serenity/pull/2127) - Replace `CreateAllowedMentions::parse` with `all_users`, `all_roles`, and `everyone` methods. - [#​2139](https://redirect.github.com/serenity-rs/serenity/pull/2139) - Change `ChannelId::name` to return `Result` instead of `Option`. - [#​2144](https://redirect.github.com/serenity-rs/serenity/pull/2144) - Don't offer different function signatures for `EventHandler` methods if the `cache` feature is disabled. Relevant cache-dependant data is now passed in using `Option`. - [#​2149](https://redirect.github.com/serenity-rs/serenity/pull/2149) - Change channel positions, role positions, and bitrates to always be `u32`. - [#​2173](https://redirect.github.com/serenity-rs/serenity/pull/2173) - Replace the implementation of `Future` for `ClientBuilder` with `IntoFuture`. - [#​2173](https://redirect.github.com/serenity-rs/serenity/pull/2173) - Make `ClientBuilder::{get_token, get_type_map, get_cache_settings}` infallible. - [#​2194](https://redirect.github.com/serenity-rs/serenity/pull/2194) - Change `CacheUpdate::Output` for `ChannelDeleteEvent` from `()` to `Vec`. - [#​2205](https://redirect.github.com/serenity-rs/serenity/pull/2205) - Wrap the following large model fields in `Box`: - `CommandInteraction::member` - `ComponentInteraction::message` - `ModalInteraction::message` - `Message::member` - `Message::interaction` - [#​2224](https://redirect.github.com/serenity-rs/serenity/pull/2224) - Introduce `CreateSelectMenuKind` and `ComponentInteractionDataKind` enums to better enforce well-formation of requests. - [#​2244](https://redirect.github.com/serenity-rs/serenity/pull/2244) - Flatten the `http` module by re-exporting all types found in submodules at the top level and removinng access to the submodules themselves. - [#​2277](https://redirect.github.com/serenity-rs/serenity/pull/2277) - Make `ErrorResponse` non-exhaustive, change the `url` field from `Url` to `String`, and add a `method` field. - [#​2285](https://redirect.github.com/serenity-rs/serenity/pull/2285) - Wrap the `Http::ratelimiter` field in `Option`, and remove the corresponding `ratelimiter_disabled` field. - [#​2285](https://redirect.github.com/serenity-rs/serenity/pull/2285) - Add an optional `reason` parameter to `Http::{ban, kick}`, and remove `Http::{ban,kick}_with_reason`. - [#​2288](https://redirect.github.com/serenity-rs/serenity/pull/2288) - Merge the `Route` and `RouteInfo` enums, and add `method` and `params` fields to the `Request` struct. - [#​2310](https://redirect.github.com/serenity-rs/serenity/pull/2310) - Flatten the `model::application` module in the same way the `http` module was flattened. - [#​2327](https://redirect.github.com/serenity-rs/serenity/pull/2327) - Change the `ThreadMembersUpdateEvent::member_count` field from `u8` to `i16`. - [#​2393](https://redirect.github.com/serenity-rs/serenity/pull/2393) - Change the following field and enum variant types: - `GuildUpdateEvent::guild` from `PartialGuild` to `Guild` - `Reaction::member` from `Option` to `Member` - `Integration::guild_id` from `GuildId` to `Option` - `IncidentUpdate::status` from `IncidentStatus` to `String` (`IncidentStatus` is also removed) - `{Guild,PartialGuild}::premium_subscription_count` from `u64` to `Option` - `InputText::value` from `String` to `Option` - `CurrentApplicationInfo::owner` from `User` to `Option` - `ScheduledEventMetadata::location` from `String` to `Option` - `Trigger::KeywordPreset` from a tuple variant to a struct variant - [#​2393](https://redirect.github.com/serenity-rs/serenity/pull/2393) - Rename the following field and enum variants: - `Incident::short_link` to `shortlink` - `ThreadDeleteEvent::channels_id` to `channel_ids` - `ThreadMembersUpdateEvent::removed_members_ids` to `removed_member_ids` - `InviteTargetType::EmmbeddedApplication` to `EmbeddedApplication` - `Scope::RelactionshipsRead` to `RelationshipsRead` - [#​2393](https://redirect.github.com/serenity-rs/serenity/pull/2393), [#​2418](https://redirect.github.com/serenity-rs/serenity/pull/2418) - Change `CurrentUser` to be a newtype around `User`, implement the `Deref` trait, and remove the `guilds`, `invite_url`, and `invite_url_with_oauth2_scopes` methods. The only method now unique to `CurrentUser` is `edit`. All other methods are available to call via deref coercion. - [#​2397](https://redirect.github.com/serenity-rs/serenity/pull/2397) - Make the following `model` types non-exhaustive: - `model::application::{Interaction, ActionRow, Button, SelectMenu, SelectMenuOption, InputText}` - `model::application::{PartialCurrentApplicationInfo, Team, TeamMember, InstallParams}` - `model::channel::{PartialGuildChannel, ChannelMention}` - `model::gateway::{ActivityEmoji, ClientStatus}` - `model::guild::{Ban, GuildPrune, GuildInfo, UnavailableGuild, GuildWelcomeScreen}` - `model::guild::{ScheduledEventMetadata, ScheduledEventUser}` - `model::guild::automod::{Rule, TriggerMetadata, Action, ActionExecution}` - `model::misc::EmojiIdentifier` - [#​2428](https://redirect.github.com/serenity-rs/serenity/pull/2428) - Change `CacheUpdate::Output` for `ChannelUpdateEvent` from `()` to `Channel`. Also, make `{Guild,PartialGuild}::user_permissions_in` infallible and change `Error::InvalidPermissions` into a struct variant containing both the the `required` permissions as well as the `present` permissions. - [#​2460](https://redirect.github.com/serenity-rs/serenity/pull/2460) - Wrap secret tokens in `secrecy::SecretString` to prevent them being leaked through `Debug` implementations, and so that they are zeroed when dropped. - [#​2462](https://redirect.github.com/serenity-rs/serenity/pull/2462), [#​2467](https://redirect.github.com/serenity-rs/serenity/pull/2467), [#​2586](https://redirect.github.com/serenity-rs/serenity/pull/2586) - Change image hashes from `String`s to a dedicated `ImageHash` type which saves on space by storing the hash directly as bytes. - [#​2464](https://redirect.github.com/serenity-rs/serenity/pull/2464) - Optimize the size of many model structs by changing the types of their fields: - All `rate_limit_per_user` fields are now counted using a `u16`. - Channel `position` fields now hold a `u16`. - Role `positition` fields now hold a `u16`. - All `auto_archive_position` fields are now an enum `AutoArchivePosition`. - All `afk_timeout` fields are now an enum `AfkTimeout`. - Replace the `DefaultReaction` struct with a `ForumEmoji` enum. - The `Sticker::sort_value` field is now an `Option`. - The `min_values` and `max_values` fields for Select Menus now hold a `u8`. - The `max_age` invite field now holds a `u32`. - The `max_uses` invite field now holds a `u8`. - The `ActivityParty` current and maximum size are now of type `u32`. - The `Ready::version` field is now a `u8`. - The `min_length` and `max_length` fields for Input Text components now hold a `u16`. - The `mention_total_limit` field for automod triggers now holds a `u8`. - The `RoleSubscriptionData::total_months_subscribed` field is now a `u16`. - [#​2470](https://redirect.github.com/serenity-rs/serenity/pull/2470) - Rename `{Http,ChannelId,GuildChannel}::create_public_thread` to `create_thread_from_message`, and similarly rename `create_private_thread` to `create_thread`, to more accurately reflect their behavior. The corresponding endpoints have also been renamed from `ChannelPublicThreads`/`ChannelPrivateThreads`, to `ChannelMessageThreads`/`ChannelThreads`, respectively. - [#​2519](https://redirect.github.com/serenity-rs/serenity/pull/2519) - Make stage channels text-based. - [#​2551](https://redirect.github.com/serenity-rs/serenity/pull/2551) - The `ThreadDelete` event now provides the full `GuildChannel` object for the deleted thread if it is present in the cache. - [#​2553](https://redirect.github.com/serenity-rs/serenity/pull/2553) - The `ThreadUpdate` event now provides the old thread's `GuildChannel` object if it is present in the cache. - [#​2554](https://redirect.github.com/serenity-rs/serenity/pull/2554) - The `Webhook::source_guild` and `Webhook::source_channel` fields have had their types changed from `Option`/`Option` to their own `Option`/`Option` types in order to avoid deserialization errors. These new types contain very few fields, but have methods for converting into `PartialGuild`s or `Channel`s by querying the API. - [#​2569](https://redirect.github.com/serenity-rs/serenity/pull/2569) - Replaced the `json::prelude` module with public wrapper functions that abstract over both `serde_json` and `simd-json`. - [#​2593](https://redirect.github.com/serenity-rs/serenity/pull/2593) - Rename `GatewayIntents::GUILD_BANS` to `GUILD_MODERATION` (the old name is still present but is deprecated). - [#​2598](https://redirect.github.com/serenity-rs/serenity/pull/2598) - Change `CreateInteractionResponseMessage::flags` to take `InteractionResponseFlags` instead of `MessageFlags`. - [#​2609](https://redirect.github.com/serenity-rs/serenity/pull/2609) - Split parts of `ThreadMember` into `PartialThreadMember`. - [#​2622](https://redirect.github.com/serenity-rs/serenity/pull/2622) - Implement role addition/removal using dedicated endpoints. - [#​2623](https://redirect.github.com/serenity-rs/serenity/pull/2623) - Use dedicated types for `GuildId::audit_logs`. - [#​2625](https://redirect.github.com/serenity-rs/serenity/pull/2625) - Change `Guild::members_with_status` to return `impl Iterator` instead of `Vec`. ##### Removed - [#​1864](https://redirect.github.com/serenity-rs/serenity/pull/1864), [#​1902](https://redirect.github.com/serenity-rs/serenity/pull/1902) - Remove all deprecated types, fields, and methods. - [#​1885](https://redirect.github.com/serenity-rs/serenity/pull/1885) - Remove the lifetime parameter on `model::application::ResolvedTarget`. - [#​1927](https://redirect.github.com/serenity-rs/serenity/pull/1927) - Remove `model::guild::GuildContainer`. - [#​1938](https://redirect.github.com/serenity-rs/serenity/pull/1938) - Remove `EventHandler::{guild_unavailable, unknown}`. - [#​1959](https://redirect.github.com/serenity-rs/serenity/pull/1959) - Remove `EditProfile::{email, password, new_password}`. - [#​2034](https://redirect.github.com/serenity-rs/serenity/pull/2034) - Remove `serenity::json::from_number`. Users should call `.into()` instead. - [#​2128](https://redirect.github.com/serenity-rs/serenity/pull/2128) - Remove the `Channel::Category` variant, as `GuildChannel::kind` can already be `ChannelType::Category`. However, the `Channel::category` method is still available. - [#​2161](https://redirect.github.com/serenity-rs/serenity/pull/2161) - Remove the `Mention::Emoji` variant. - [#​2162](https://redirect.github.com/serenity-rs/serenity/pull/2162) - Remove `serenity::token::parse` - use `token::validate` instead. - [#​2246](https://redirect.github.com/serenity-rs/serenity/pull/2246) - Remove the `absolute_ratelimits` feature and replace it with a runtime configuration option. - [#​2308](https://redirect.github.com/serenity-rs/serenity/pull/2308) - Remove `CacheAndHttp`, and inline it as separate `cache` and `http` fields in the following structs: - `ShardManagerOptions` - `ShardQueuer` - `ShardRunner` - `ShardRunnerOptions` - `Client` - [#​2393](https://redirect.github.com/serenity-rs/serenity/pull/2393) - Remove non-existent fields and enum variants that Discord no longer sends back from the API. The following fields have been removed: - `VoiceServerUpdateEvent::channel_id` - `ResumedEvent::channel_id` - `Ready::{presences, private_channels, trace}` - `InviteGuild::{text_channel_count, voice_channel_count}` - `VoiceState::token` - `IncidentUpdate::affected_components` (and also the `AffectedComponent` struct) - `Maintenance::{description, stop, start}` - `SelectMenu::values` - `MessageUpdateEvent::{author, timestamp, nonce, kind, stickers}` - `PartialGuild::{owner, permissions}` - `InviteTargetType::Normal` - `Trigger::HarmfulLink` - [#​2424](https://redirect.github.com/serenity-rs/serenity/pull/2424) - Remove the `FromStrAndCache` and `StrExt` traits. Also removes `model::{ChannelParseError,RoleParseError}`, which conflicted with types of the same name from `utils`. - [#​2429](https://redirect.github.com/serenity-rs/serenity/pull/2429) - Remove the useless re-exports of the various submodules of `model` from the `model::prelude`, and don't re-export types from other libraries, like `Deserialize` or `HashMap`. - [#​2466](https://redirect.github.com/serenity-rs/serenity/pull/2466) - Remove the `DefaultAvatar` enum. - [#​2531](https://redirect.github.com/serenity-rs/serenity/pull/2531) - The following bitflag types no longer implement `PartialOrd`/`Ord`: - ActivityFlags - ApplicationFlags - ChannelFlags - GatewayIntents - GuildMemberFlags - InteractionResponseFlags - MessageFlags - Permissions - SpeakingState - SystemChannelFlags - ThreadMemberFlags - UserPublicFlags - [#​2559](https://redirect.github.com/serenity-rs/serenity/pull/2559) - Remove the `EventType` enum. Instead of `Event::event_type().name()`, users should just call `Event::name`. - [#​2578](https://redirect.github.com/serenity-rs/serenity/pull/2578) - Remove the `PingInteraction::guild_locale` field.

Configuration

📅 Schedule: Branch creation - "before 9am on Saturday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.

renovate[bot] commented 11 months ago

⚠ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path crates/koe/Cargo.toml --workspace
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
    Updating crates.io index
error: failed to select a version for `zeroize`.
    ... required by package `xsalsa20poly1305 v0.8.0`
    ... which satisfies dependency `xsalsa20poly1305 = "^0.8"` of package `songbird v0.3.2`
    ... which satisfies dependency `songbird = "^0.3.2"` of package `koe v0.1.0 (/tmp/renovate/repos/github/ciffelia/koe/crates/koe)`
versions that meet the requirements `>=1, <1.4` are: 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.0

all possible versions conflict with previously selected packages.

  previously selected package `zeroize v1.4.0`
    ... which satisfies dependency `zeroize = "^1.4"` of package `secrecy v0.8.0`
    ... which satisfies dependency `secrecy = "^0.8.0"` of package `serenity v0.12.0`
    ... which satisfies dependency `serenity = "^0.12.0"` of package `koe v0.1.0 (/tmp/renovate/repos/github/ciffelia/koe/crates/koe)`

failed to select a version for `zeroize` which could resolve this conflict
File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path crates/koe-call/Cargo.toml --workspace
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
    Updating crates.io index
error: failed to select a version for `zeroize`.
    ... required by package `xsalsa20poly1305 v0.8.0`
    ... which satisfies dependency `xsalsa20poly1305 = "^0.8"` of package `songbird v0.3.2`
    ... which satisfies dependency `songbird = "^0.3.2"` of package `koe v0.1.0 (/tmp/renovate/repos/github/ciffelia/koe/crates/koe)`
versions that meet the requirements `>=1, <1.4` are: 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.0

all possible versions conflict with previously selected packages.

  previously selected package `zeroize v1.4.0`
    ... which satisfies dependency `zeroize = "^1.4"` of package `secrecy v0.8.0`
    ... which satisfies dependency `secrecy = "^0.8.0"` of package `serenity v0.12.0`
    ... which satisfies dependency `serenity = "^0.12.0"` of package `koe v0.1.0 (/tmp/renovate/repos/github/ciffelia/koe/crates/koe)`

failed to select a version for `zeroize` which could resolve this conflict