Releases: serenity-rs/poise
v0.6.2
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 defaultAdminandDeveloperto be initialized to owners.
- This makes it possible to specify
- 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
CommandandArgumentParseerrors (6ead1e1)- This prevents these errors from unintentionally pinging users.
- Fixed
additional_prefixesusage 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-subscriberinstead ofenv_logger(db10b12) - Context menu commands now properly check
default_member_permissions(e850875)- Previously, the builder failed to set
default_member_permissionswhen creating a context menu command.
- Previously, the builder failed to set
- 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
Userreturned by a user context menu command now includesPartialMemberdata when available (4c7661d) CommandandArgumentParseerror 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
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
Now with serenity 0.12!
New features:
ChoiceParameteris now not only a derive macro, but also a trait, so you can implement it manually (bc250b8)HelpConfiguration::include_descriptioncan be used to toggle whether a single command's help output includes itsdescription, or only itshelp_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) Commandno longer hasDefaultbounds on its generics (695ae1d)- Changed some field types on
Commandto be more idiomatic (6c08cfb) CooldownTrackermethods now take a dedicated user-constructableCooldownContextinstead ofContext<'_, U, E>, to makeCooldownTrackerusable 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
New features:
- Added serenity trait impls for ApplicationContext and PrefixContext as well
- Previously,
AsRef<Cache>,AsRef<Http>,AsRef<ShardMessenger>,AsRef<Context>, andCacheHttpwere only implemented forpoise::Context - With these impls, poise's context types can be used as-is for the context parameter in serenity functions
- Previously,
- Support generics in
#[poise::command]-annotated functions - Added
Context.guild_channel()
Behavior changes:
- Improved formatting of
builtins::serverscommand- 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_creationtofalse
- To return to previous behavior, set
Detailed changelog: v0.5.6...v0.5.7
0.5.6
New features:
- Added
cache(),http(),reply(),ping()methods toContext,ApplicationContext,PrefixContext - Added
subcommand_requiredcommand 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_interactionutility function- Previously, poise only features a utility function for opening modals from command invocations
- Added
remaining_cooldown_2as the successor toremaining_cooldownwhich allows changing the cooldown config on a per-invocation basis instead of per-command- In the next breaking release,
remaining_cooldownwill be replaced withremaining_cooldown_2
- In the next breaking release,
- 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
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
API updates:
- The
payloadfield ofFrameworkError::CommandPanichas been changed fromBox<dyn Any + Send>toOption<String>- This is technically a breaking change
- However, the newly introduced
payloadfield in 0.5.3 madeFrameworkErroraccidentally not Sync anymore - And
FrameworkError::CommandPanichas 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
New features:
- Added
builtins::paginate()as an example implementation of pagination - Added missing events in
EventWrapper(#144) - Added
FrameworkError::CommandPanicto allow custom handling of panics (#140)builtins::on_errorresponds with an "Internal error" embed when encounteringCommandPanic
Behavior changes:
builtins::on_errornow printsFrameworkError::Commandnot 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_localizedordescription_localizedare used multiple times (#143)
Detailed changelog: v0.5.2...v0.5.3
0.5.2
New features:
- Added
track_deletionfeature to commands - Added all of
Context's methods toPrefixContextandApplicationContext
Behavior changes:
- Editing commands not marked track_edits no longer re-runs the command
builtins::serversnow shows hidden statistics for the entire bot team, not just owner
Detailed changelog: v0.5.1...v0.5.2
0.5.1
New features:
- Added
FrameworkOptions::skip_checks_for_owner
Behavior changes:
execute_modaldoesn'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