Skip to content

Releases: serenity-rs/poise

0.6.1

11 Jan 14:09
Compare
Choose a tag to compare

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: v0.6.0...v0.6.1

Thanks to @kangalio!

0.6.0-rc1 / 0.6.1-rc1

28 Nov 21:30
Compare
Choose a tag to compare
0.6.0-rc1 / 0.6.1-rc1 Pre-release
Pre-release

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: 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.

0.5.7

22 Oct 14:09
Compare
Choose a tag to compare

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: v0.5.6...v0.5.7

0.5.6

12 Sep 19:16
Compare
Choose a tag to compare

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: v0.5.5...v0.5.6

0.5.5

27 Apr 22:16
Compare
Choose a tag to compare

New features:

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

Detailed changelog: v0.5.4...v0.5.5

0.5.4

23 Apr 19:39
Compare
Choose a tag to compare

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: v0.5.3...v0.5.4

0.5.3

20 Apr 14:13
Compare
Choose a tag to compare

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 0a03fb9
  • Fixed a compile error when name_localized or description_localized are used multiple times (#143)

Detailed changelog: v0.5.2...v0.5.3

0.5.2

16 Dec 10:53
Compare
Choose a tag to compare

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: v0.5.1...v0.5.2

0.5.1

05 Dec 19:43
Compare
Choose a tag to compare

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: v0.5.0...v0.5.1

0.5.0

22 Nov 20:35
Compare
Choose a tag to compare

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<Cache>, AsRef<Http>, AsRef<ShardMessenger>, 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: v0.4.1...v0.5.0