0.3.0
New features:
- Custom arbitrary data associated with commands via custom_data command attribute and Command struct field
- Make it easier to run a custom event loop by exposing important setup functions
set_qualified_names()
insert_owners_from_http()
- This code is run under the hood in the framework setup code and is now accessible to custom event loops too
- The time crate can now be used in place of chrono (#83)
- You can now use the
check
command attribute multiple times to add multiple checks - Support for Discord's localization API (#82)
Framework::client()
method to get the underlyingserenity::Client
API updates:
Framework::shard_manager()
now returns&Arc
instead ofArc
Context::author_member()
return type changed fromMember
toCow<'_, Member>
to avoid needless cloning (#81)- Use
.into_owned()
to convertCow<'_, Member>
back toMember
- Use
fn message(self) -> Message
method on ReplyHandle split intofn message(&self) -> Cow<'_, Message>
andfn into_message(self) -> Message
(#84)- Reduces cloning if you just need a reference to the message
- Allows using the ReplyHandle after retrieving the message
Framework::build()
renamed toFramework::builder()
(#96)Framework::start_with()
now takesimpl FnOnce
instead offn
- To be usable with with
serenity::Client
'sstart_shard
,start_shard_range
, andstart_shards
methods
- To be usable with with
- Removed
serenity
re-export at crate root (serenity_prelude
still exists!) - Command fields renamed:
inline_help
=>description
,multiline_help
=>help_text
- Command and parameter
name
anddescription
fields changed from&'static str
toString
- To make them overrideable at runtime
- Autocomplete functions' partial input parameter is now always
&str
- Was previously String, [i/u][8/16/32/64], f[32/64], depending on parameter type
Behavior changes:
- Fix identifying_name command attribute not being applied
- Built-in register commands now report command count correctly
- Prefix-only commands aren't included anymore
ReplyHandle::edit()
now keeps parts of the message as before if not specified- Fix number autocomplete (was completely borked)
- Code block parsing is now more precise
- With ```textwithspecialcharacters, textwithspecialcharacters is no longer recognized as the programming language, but as part of the code (mirroring Discord's behavior)
ReplyHandle::edit()
now works on ephemeral followup responses
Detailed changelog: v0.2.2...v0.3.0