Skip to content

Releases: serenity-rs/poise

v0.6.2

13 Apr 16:25

Choose a tag to compare

0.6.2

New features:

  • Added handler for non-command messages (1f0abfb)
  • Added builtins::pretty_help, a help command that uses embeds (ec19915)
  • Added support for modifying the last invocation of a command (c67dde5)
    • This makes it possible to shorten or lengthen a cooldown after invocation.
  • Added ability to only initialize certain roles to owners (b887224)
    • This makes it possible to specify TeamMemberRoles other than the default Admin and Developer to be initialized to owners.
  • Added support for editing initial interaction response attachments (525bd69)
  • Added support for manual cooldowns on single commands (7ae055c)
  • Added support for polls (3eefed4)
  • Added support for user-installed apps, aka user apps (773da6c)

Behavior changes:

  • The pound sign (#) is now supported in language identifiers (e.g., c#, f#) in code blocks (59dba56)
  • Fixed event handler example to remove a race condition and prevent the bot from replying to itself (9def484, 48b0318)
  • Disabled allowed mentions for Command and ArgumentParse errors (6ead1e1)
    • This prevents these errors from unintentionally pinging users.
  • Fixed additional_prefixes usage in the basic structure example (8ba38c0)
  • Snowflake ID arguments to prefix commands are now parsed as mentions where appropriate (bbc837a)
  • Updated examples to use tracing-subscriber instead of env_logger (db10b12)
  • Context menu commands now properly check default_member_permissions (e850875)
    • Previously, the builder failed to set default_member_permissions when creating a context menu command.
  • Command description length is now determined based on chars instead of bytes (e144ede)
    • This resolves an artifical constraint on languages that use multibyte (CJK) characters. Further discussion in #379.
  • The resolved User returned by a user context menu command now includes PartialMember data when available (4c7661d)
  • Command and ArgumentParse error replies are now ephemeral (24fe146)

Miscellaneous:

  • Reduced generated code for field conversions in macros (5b369bb)
  • Bumped Rust edition to 2021 and added edition to .rustfmt.toml (1c34184, f1e79b5)

Detailed changelog: v0.6.1...v0.6.2

Thanks to @kangalio, @emilyyyylime, @GnomedDev, @fee1-dead, @asibahi, @c-git, @Spacerulerwill, @matteopolak, @jamesbt365, @NotNorom, @keiveulbugs, @arqunis, @ravener, @DocJade, @fgardt, @cycle-five, @Nydauron, @zkxs, @yuimarudev, @meditationmind, @nwerosama, @black-sock, @TapGhoul, and @HactarCE!

0.6.1

11 Jan 14:09

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

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

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

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

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

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

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

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

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