0.4.0
New features:
- Added std::error::Error impl for FrameworkError
- Added
FrameworkError::discord() -> &serenity::Contextmethod - 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::UnknownCommandandFrameworkError::UnknownInteraction- These error cases would previously just
log::warn!()
- These error cases would previously just
- Exposed internals of
dispatch_message()as new functionsparse_invocation()andrun_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: &Commandparameter 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(), anddispatch_autocomplete()toResult<(), FrameworkError> - Simplified return type of
extract_command_and_run_checks()toResult<ApplicationContext, FrameworkError> - Removed
futures_corere-export
Behavior changes:
- Internal warnings now use
log::warn!()/log::error!()instead ofeprintln!()- That way, you can mute them or handle them specially
- Default
FrameworkError::DynamicPrefixhandler 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::CommandStructureMismatchis 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: v0.3.0...v0.4.0