From a89c4421498d10a3114414ff79b1bd99386dc46e Mon Sep 17 00:00:00 2001 From: kangalioo Date: Tue, 22 Nov 2022 21:34:12 +0100 Subject: [PATCH] Bump to 0.5.0 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- macros/Cargo.toml | 2 +- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f2d1d800d2..4d37ff74e966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +# 0.5.0 + +New features: +- Added `Context::parent_commands()` +- Added `Context::invocation_string()` +- Added `builtins::register_in_guild()` and `builtins::register_globally()` convenience functions +- The return value of autocomplete callbacks can be any serializable type now +- `Context` can now be passed directly into most serenity API functions + - Because it now implements `AsRef`, `AsRef`, `AsRef`, and `CacheHttp` traits +- Added `execute_modal()` function with support for modal timeouts + +API updates: +- `Modal::create()` gained a `custom_id: String` parameter + - To make it possible to tell apart two modal interactions +- Removed `CreateReply::reference_message(MessageReference)` in favor of `CreateReply::reply(bool)` + - For the unusual case of setting a different reference message than the invocation (why would you? I'm genuinely interested), you can still convert the `CreateReply` into `serenity::CreateMessage` manually via `.to_prefix()` and call `serenity::CreateMessage`'s `reference_message()` method +- Renamed `FrameworkBuilder::user_data_setup()` method to `setup()` +- Renamed `FrameworkOptions::listener` field to `event_handler` +- Renamed `Context::discord()` method to `serenity_context()` + +Behavior changes: +- `register_application_commands_buttons()` now has emojis, reworked wording, and prints the time taken to register +- `Modal::execute()` always responds to the correct modal now +- When a subcommand is invoked, all parent commands' checks are run too, now + +Detailed changelog: https://github.com/kangalioo/poise/compare/v0.4.1...v0.5.0 + # 0.4.1 Behavior changes: diff --git a/Cargo.lock b/Cargo.lock index c5c066fdcd65..608a1ffe4823 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -756,7 +756,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "poise" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-trait", "derivative", @@ -778,7 +778,7 @@ dependencies = [ [[package]] name = "poise_macros" -version = "0.4.0" +version = "0.5.0" dependencies = [ "darling", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 3d507d23a78c..bac0636e111c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["kangalioo "] edition = "2018" name = "poise" -version = "0.4.1" +version = "0.5.0" description = "A Discord bot framework for serenity" license = "MIT" repository = "https://github.com/kangalioo/poise/" @@ -12,7 +12,7 @@ tokio = { version = "1.21.1", default-features = false } # for async in general futures-core = { version = "0.3.13", default-features = false } # for async in general futures-util = { version = "0.3.13", default-features = false } # for async in general once_cell = { version = "1.7.2", default-features = false, features = ["std"] } # to store and set user data -poise_macros = { path = "macros", version = "0.4.0" } # remember to update the version on changes! +poise_macros = { path = "macros", version = "0.5.0" } # remember to update the version on changes! async-trait = { version = "0.1.48", default-features = false } # various traits regex = { version = "1.6.0", default-features = false, features = ["std"] } # prefix log = { version = "0.4.14", default-features = false } # warning about weird state diff --git a/macros/Cargo.toml b/macros/Cargo.toml index c39425084b25..e62a682f139b 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "poise_macros" -version = "0.4.0" # remember to update the version +version = "0.5.0" # remember to update the version authors = ["kangalioo "] edition = "2018" description = "Internal macro implementation crate of poise"