Kangalioo Poise Versions Save

Discord bot command framework for serenity, with advanced features like edit tracking and flexible argument parsing

v0.6.1

4 months ago

New features:

  • Choice parameters can now be defined inline in a function signature (6167311)

    For example:

    #[choices("Europe", "Asia", "Africa", "America", "Australia", "Antarctica")]
    continent: &'static str
    

Detailed changelog: https://github.com/serenity-rs/poise/compare/v0.6.0...v0.6.1

Thanks to @kangalio!

v0.6.0-rc1

5 months ago

Now with serenity 0.12!

New features:

  • ChoiceParameter is now not only a derive macro, but also a trait, so you can implement it manually (bc250b8)
  • HelpConfiguration::include_description can be used to toggle whether a single command's help output includes its description, or only its help_text (0ad8ee6)

API updates:

  • A lot of structs and enum are now #[non_exhaustive] to allow backwards compatible new features in the future (035e035, 6c08cfb, 1cbfeef)
  • Command no longer has Default bounds on its generics (695ae1d)
  • Changed some field types on Command to be more idiomatic (6c08cfb)
  • CooldownTracker methods now take a dedicated user-constructable CooldownContext instead of Context<'_, U, E>, to make CooldownTracker usable outside poise internals ([bd73861](https://github.com/serenity-rs/poise/cMake ommit/bd73861d2679c26040353eba460d933c7d3a7a15))

Behavior changes:

Detailed changelog: https://github.com/serenity-rs/poise/compare/v0.5.7...v0.6.0

Thanks to @kangalio, @docwilco, @drwilco, @GnomedDev, @scottbot95!

Why "0.6.0-rc1 / 0.6.1-rc1"? I (@kangalio) messed up when releasing. First, I prematurely released 0.6.0, which was buggy and had to be yanked. Then, bugs were fixed and I decided to push it as 0.6.0-rc1, thinking "ok we will release 0.6.0 properly this time, starting with rc's". However, cargo treats 0.6.0 as being semver-compatible to 0.6.0-rc1, hence even people depending on 0.6.0-rc1 were served the buggy 0.6.0 by cargo. No good. So I had to yank that too, and pushed the identical code as 0.6.1-rc1 instead.

v0.6.0

5 months ago

Now with serenity 0.12!

New features:

  • ChoiceParameter is now not only a derive macro, but also a trait, so you can implement it manually (bc250b8)
  • HelpConfiguration::include_description can be used to toggle whether a single command's help output includes its description, or only its help_text (0ad8ee6)

API updates:

  • A lot of structs and enum are now #[non_exhaustive] to allow backwards compatible new features in the future (035e035, 6c08cfb, 1cbfeef)
  • Command no longer has Default bounds on its generics (695ae1d)
  • Changed some field types on Command to be more idiomatic (6c08cfb)
  • CooldownTracker methods now take a dedicated user-constructable CooldownContext instead of Context<'_, U, E>, to make CooldownTracker usable outside poise internals (bd73861)

Behavior changes:

Detailed changelog: https://github.com/serenity-rs/poise/compare/v0.5.7...v0.6.0

Thanks to @kangalio, @docwilco, @drwilco, @GnomedDev, @scottbot95!

v0.5.7

6 months ago

New features:

  • Added serenity trait impls for ApplicationContext and PrefixContext as well
    • Previously, AsRef<Cache>, AsRef<Http>, AsRef<ShardMessenger>, AsRef<Context>, and CacheHttp were only implemented for poise::Context
    • With these impls, poise's context types can be used as-is for the context parameter in serenity functions
  • Support generics in #[poise::command]-annotated functions
  • Added Context.guild_channel()

Behavior changes:

  • Improved formatting of builtins::servers command
    • More compact and respects the message character limit
  • Titles from thread creations are not interpreted as command invocations anymore
    • To return to previous behavior, set PrefixFrameworkOptions.ignore_thread_creation to false

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.6...v0.5.7

v0.5.6

8 months ago

New features:

  • Added cache(), http(), reply(), ping() methods to Context, ApplicationContext, PrefixContext
  • Added subcommand_required command attribute
    • When a command with subcommand_required is invoked without a subcommand (only possible as a text/prefix command), an error is thrown
  • Added execute_modal_on_component_interaction utility function
    • Previously, poise only features a utility function for opening modals from command invocations
  • Added remaining_cooldown_2 as the successor to remaining_cooldown which allows changing the cooldown config on a per-invocation basis instead of per-command
    • In the next breaking release, remaining_cooldown will be replaced with remaining_cooldown_2
  • Added Command.source_code_name

Behavior changes:

  • Reply messages (i.e. reference_message set to Some) now ping by default
    • This matches the default from serenity and the default from the Discord client
  • Raw identifiers can now be used for command names and command parameter names

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.5...v0.5.6

v0.5.5

1 year ago

New features:

  • Added #[min_length] and #[max_length] support for slash command string parameters

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.4...v0.5.5

v0.5.4

1 year ago

API updates:

  • The payload field of FrameworkError::CommandPanic has been changed from Box<dyn Any + Send> to Option<String>
    • This is technically a breaking change
    • However, the newly introduced payload field in 0.5.3 made FrameworkError accidentally not Sync anymore
    • And FrameworkError::CommandPanic has only been introduced a few days ago in 0.5.3
    • Therefore, I think it's ok to release this as a patch release to reverse the accidental breaking change from 0.5.3

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.3...v0.5.4

v0.5.3

1 year ago

New features:

  • Added builtins::paginate() as an example implementation of pagination
  • Added missing events in EventWrapper (#144)
  • Added FrameworkError::CommandPanic to allow custom handling of panics (#140)
    • builtins::on_error responds with an "Internal error" embed when encountering CommandPanic

Behavior changes:

  • builtins::on_error now prints FrameworkError::Command not just in Discord chat, but in console as well
    • because responding in Discord sometimes doesn't work, see 0a03fb905ca0bc3b2ee0701fe35d3c89ecf5a654
  • Fixed a compile error when name_localized or description_localized are used multiple times (#143)

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.2...v0.5.3

v0.5.2

1 year ago

New features:

  • Added track_deletion feature to commands
  • Added all of Context's methods to PrefixContext and ApplicationContext

Behavior changes:

  • Editing commands not marked track_edits no longer re-runs the command
  • builtins::servers now shows hidden statistics for the entire bot team, not just owner

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.1...v0.5.2

v0.5.1

1 year ago

New features:

  • Added FrameworkOptions::skip_checks_for_owner

Behavior changes:

  • execute_modal doesn't panic anymore when the timeout is reached
  • Checking user permissions properly falls back to HTTP when cache is enabled but empty

Detailed changelog: https://github.com/kangalioo/poise/compare/v0.5.0...v0.5.1