From 9e0a3a413da01686921b89b87262b813b2cbc9ed Mon Sep 17 00:00:00 2001 From: kangalioo Date: Thu, 12 May 2022 19:30:10 +0200 Subject: [PATCH] Bump to 0.2.0, add CHANGELOG.md --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- macros/Cargo.toml | 2 +- 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..f404992fba4c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +# 0.2.0 + +New features: +- `PrefixFrameworkOptions::ignore_bots` to disable executing commands posted by bots +- `builtins::register_application_commands_buttons()` allows managing slash command registration with buttons +- `#[poise(subcommands(...))]` attribute argument as a convenient alternative to manually setting the `Command::subcommands` field +- `dispatch_event()` function to allow running your own event loop without involving Framework at all +- `Modal::create()` and `Modal::execute_with_defaults()` can be used to spawn a modal with pre-filled values +- `default_member_permissions` command attribute argument, part of Discord Permissions V2 +- `Context::partial_guild` to easily get guild information without cache enabled + +API updates: +- Poise no longer depends on serenity's cache feature +- Some structs and enums were made non-exhaustive to make future non-breaking changes easier +- The `Event` enum has been updated to include all `serenity::EventHandler` events again +- `FrameworkBuilder::initialize_owners()` takes self instead of &mut self, like the other builder methods +- The macro generated code emits `::std::result::Result` instead of `Result` now, which prevents collisions with user-defined Result type aliases +- `CreateReply` now implements `Clone` +- Some callbacks were changed to receive `FrameworkContext<'_, U, E>` instead of `&Framework` (had to be done for `dispatch_event()`) + +Behavior changes: +- Autocomplete callbacks and argument parse errors don't cause a cooldown trigger anymore +- Features using the bot's ID now work again (execute_self_messages, required_bot_permissions, mention_as_prefix) +- Guild owners can no longer register slash commands in their guild (only bot owners now) +- Compile times should be faster through less monomorphization bloat +- Attachments in initial responses are supported now + +# 0.1.0 + +Initial crates.io release diff --git a/Cargo.lock b/Cargo.lock index b046690efd4d..cc29cac674ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -712,7 +712,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "poise" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-trait", "derivative", @@ -730,7 +730,7 @@ dependencies = [ [[package]] name = "poise_macros" -version = "0.1.0" +version = "0.2.0" dependencies = [ "darling", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 662e57adcc87..77586e51da7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["kangalioo "] edition = "2018" name = "poise" -version = "0.1.0" +version = "0.2.0" description = "A Discord bot framework for serenity" license = "MIT" repository = "https://github.com/kangalioo/poise/" @@ -12,7 +12,7 @@ tokio = { version = "1.4.0", 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.1.0" } # remember to update the version on changes! +poise_macros = { path = "macros", version = "0.2.0" } # remember to update the version on changes! async-trait = { version = "0.1.48", default-features = false } # various traits regex = { version = "1.5.4", 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 5f109a761e03..f60a9a19c82a 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "poise_macros" -version = "0.1.0" # remember to update the version +version = "0.2.0" # remember to update the version authors = ["kangalioo "] edition = "2018" description = "Internal macro implementation crate of poise"