Skip to content

Commit

Permalink
Bump to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kangalio committed Oct 9, 2022
1 parent 5fac727 commit 10025cf
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 40 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# 0.4.0

New features:
- Added std::error::Error impl for FrameworkError
- Added `FrameworkError::discord() -> &serenity::Context` method
- Added `FrameworkError::ctx() -> Option<poise::Context>` method
- Added `FrameworkError::handle()` method which calls the appropriate on_error function on itself
- Added Copy and Clone impl for PartialContext
- Added `ReplyHandle::delete()`
- Added `FrameworkError::UnknownCommand` and `FrameworkError::UnknownInteraction`
- These error cases would previously just `log::warn!()`
- Exposed internals of `dispatch_message()` as new functions `parse_invocation()` and `run_invocation()`
- Added trigger and action callback to PrefixContext
- Made EditTracker methods public: `process_message_update()`, `set_bot_response()`, `track_command()`

API updates:
- Added or changed fields of some FrameworkError enum variants
- Removed `cmd: &Command` parameter from check_permissions_and_cooldown (Context already includes it)
- triggered_by_edit and previously_tracked bool parameters replaced by new MessageDispatchTrigger enum
- Simplified return type of `dispatch_message()`, `dispatch_interaction()`, and `dispatch_autocomplete()` to `Result<(), FrameworkError>`
- Simplified return type of `extract_command_and_run_checks()` to `Result<ApplicationContext, FrameworkError>`
- Removed `futures_core` re-export

Behavior changes:
- Internal warnings now use `log::warn!()`/`log::error!()` instead of `eprintln!()`
- That way, you can mute them or handle them specially
- Default `FrameworkError::DynamicPrefix` handler now prints message content
- `ReplyHandle::edit()` now replaces existing attachments and embeds instead of adding on top
- Cooldowns are now triggered before command execution instead of after
- Added `log::warn!()` in some weird code paths that shouldn't be hit
- When a focused autocomplete option has an unrecognized name and when the autocomplete value is not a string, `FrameworkError::CommandStructureMismatch` is now thrown
- Instead of discarding the error
- `register_application_commands_buttons()` switched order of rows
- Guild-specific actions are at the top because they are more common and less destructive

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.3.0...v0.4.0

# 0.3.0

New features:
Expand Down
98 changes: 61 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["kangalioo <jannik.a.schaper@web.de>"]
edition = "2018"
name = "poise"
version = "0.3.0"
version = "0.4.0"
description = "A Discord bot framework for serenity"
license = "MIT"
repository = "https://github.com/kangalioo/poise/"
Expand All @@ -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.3.0" } # remember to update the version on changes!
poise_macros = { path = "macros", version = "0.4.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
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poise_macros"
version = "0.3.0" # remember to update the version
version = "0.4.0" # remember to update the version
authors = ["kangalioo <jannik.a.schaper@web.de>"]
edition = "2018"
description = "Internal macro implementation crate of poise"
Expand Down

0 comments on commit 10025cf

Please sign in to comment.