Releases: serenity-rs/serenity
v0.6.0-rc.2
Thanks to the following for their contributions:
A crucial release fixing a lot of misbehaviour:
Added
- [command_attr] Add some utility structs. (@acdenisSK) c:9162929
- [command_attr] Add docs for
lacking_ownership
. (@acdenisSK) c:15e7fde - [example] Add new Example about Eventing and Timing. (@Lakelezz) c:10b9cc2
- [example] Add example of embedding a local image in an embed. (@Erk-) c:709c9e4
- [framework] Add back blocking guilds, channels, and users. (@acdenisSK) c:33f8383
- [framework] Output the
#[example]
text in help (@Flat) c:7aea26c - [model] Add and use
AttachmentId
. (@Lakelezz) c:c8a5f69 - [model] Add a
channel_id_from_name
-method onGuild
. (@xacrimon) c:aae22a2 - [model] Add
GuildChannel::members
. (@Lakelezz) c:ddf7a3 - [model] Add more guild fields from guild boosting. (@AregevDev) c:4541935
- [utils] Add
EmbedMessageBuilding
-trait. (@zeyla) c:7c61f95
Fixed
- [builder] Return
&mut self
onvoice_channel
. (@Lakelezz) c:0e55b73 - [ci] Fix Azure Windows build. (@Lakelezz) c:fc3a1f6
- [client] Fix updates giving only new data. (@zeyla) c:5f7231d
- [clippy] Fix Clippy-lints. (@Lakelezz) c:cd7d07e
- [clippy] Implement suggestions from Clippy & remove Clippy arg max config. (@Flat) c:6586830
- [command_attr] Add missing
s
,owner_only
becameowners_only
. (@acdenisSK) c:3cf673e - [command_attr] Report errors from parsing group options, if any. (@acdenisSK) c:8e01ff6
- [doc] Small doc fixes for the command macro. (@acdenisSK) c:186e914
- [doc] Revise Guild's
voice_states
doc. (@nycex) c:0a640a4 - [example] Update the mentioned feature
methods
toutils
. (@Lakelezz) c:c970f44 - [framework] Fix Help displaying Groups and their Commands. (@Lakelezz) c:eca204a
- [framework] Ensure to properly hide groups. (@Lakelezz) c:5e66cd1
- [framework] Add help for nested groups and their commands. (@Lakelezz) c:6a37535
- [framework] Get rid of a redundant feature gate. (@acdenisSK) c:2ae3a48
- [framework] Treat the actual name and aliases equally. (@Lakelezz) c:82d97c2
- [framework] Check if message author is in owners HashSet. (@Flat) c:d91594b
- [framework] Change
owners_privilege
to bypass all permission-checks. (@Flat) c:98532da - [http] Fix setting role positions (@icewind1991) [c:c14ca32]
- [model] Fix lifetime issue with
send_message
. (@acdenisSK) c:3902caf - [model] Fix no-default-features compilation. (@zeyla) c:3de5378
- [model] Fix
contains_case_insensitive
andstarts_with_case_insensitive
. (@Flat) c:d27d391 - [voice] Pipe youtube-dl to ffmpeg directly. (@Flat) c:4793a84
Changed
- [builder] Use
ToString
on builder-arguments instead ofDisplay
. (@acdenisSK) c:13fae29 - [builder] Increase the capabilities for creating a channel. (@acdenisSK) c:f2ff97a
- [client] Improve
cached
's name and documentation. (@Lakelezz) c:7706475 - [command_attr] Rectify command parsing. (@acdenisSK) c:b1eff27
- [command_attr] Use the function-name. (@acdenisSK) c:05254c8
- [command_attr] Change
only
toonly_in
. (@acdenisSK) c:26b072f - [command_attr] Reinvent
group!
parsing. (@acdenisSK) c:7f9c4e1 - [command_attr] Stop appending
_HELP_COMMAND
to the generated instance from#[help]
(@acdenisSK) c:9783b35 - [example] Update the framework example. (@acdenisSK) c:0fcb43c
- [example] Update to use shard manager. (@zeyla) c:5375827
- [framework] Take into regard prefixless groups (@acdenisSK) c:ef15739
- [framework] Ensure prefixes to be mandatory on help (@Lakelezz) c:ab34f75
- [model] Update
*Id::created_at()
to return aDateTime<FixedOffset>
instead. (@AregevDev) c:8d50840 - [model] Replace
Context
as argument (@Lakelezz) c:62e19a7 c:58fa50c - [rustc] Set minimum Rust version to
1.35.0
. (@Lakelezz) c:8c83fec - [voice] Add infinite retry arg to ytdl for rst packets. (@Flat) c:86ec810
Removed
v0.5.14
This release fixes a few bugs.
Thanks to the following for their contributions:
Added
- [model] Allow turning on and off the nsfw property of guilds channels (@acdenisSK) c:68c4f5c
Changed
Fixed
- [model] Handle serde_json's "arbitrary precision" feature. (@acdenisSK) c:33f4adf
- [framework] Do not display commands their
help_available
is set tofalse
. (@Lakelezz) c:1705338 - [framework] Ignore bots when using the help-command if framework's
ignore_bots
is set totrue
. (@acdenisSK) c:e40758e - [misc.] Rename the
methods
-feature inside the third example toutils
. (@Lakelezz) c:a7ee6a6
v0.6.0-rc.1
Thanks to the following for their contributions:
A short release for some things we overlooked.
Added
- [model] Add missing fields of
current_application_info
(@mattico) c:23bed41 - [builder] Allow for channels to be (or not be) set as nsfw (@acdenisSK) c:1bd5bbc
- [framework] Bring back old parsing behaviour (@acdenisSK) c:64e97c5
- [http]
AsRef<Http>
Implementation forHttp
(@Lakelezz) c:b425ceb
Fixed
Changed
- [framework] Take into equation ignoring bots and webhooks for help (@acdenisSK) c:b1559bc
- [general] Increase minimum support Rust version (@acdenisSK) c:61ac765
- [general/framework] Shackle the minimum version of uwl to 0.3.2 (@acdenisSK) c:decbc04
v0.6.0-rc.0
Thanks to the following for their contributions:
- acdenisSK
- andreasots
- Celti
- DarkKirb
- eatsfoobars
- Erk-
- FelixMcFelix
- Flat
- hyarsan
- Kroisse
- Lakelezz
- Mishio595
- PvdBerg1998
- Roughsketch
- zeyla
Release candidate
This is a testing release for receiving feedback regarding the new big changes introduced, whether they’re satisfactory, or horrid and should be revised, before we officially stabilise them.
Please inform us of any suggestions, or bugs you might have!
Major breaking changes
Serenity has migrated to the 2018 Rust edition, whose lints and idioms are enforced in its codebase.
The cache and http are no longer globally accessible. The Context
now carries instances to them, and as such, all functions that had used the cache and http before, now accept the context as their first parameter in order to operate. Passing the fields present on the context is acceptable too.
The framework had been swayed off of builders, and proselytised to procedural, macro-based attributes.
Giving options to your commands might have looked like this:
command!(foo(ctx, msg, args) {
...
});
framework.command("foo", |c|
c.description("I am foobar")
.min_args(1)
.max_args(2)
.usage("#foo bar baz")
.cmd(foo));
But now, it will be:
#[command] // Marks this function as a command.
#[description = "I am foobar"] // These are the "parameter" attributes, for providing the options to the attribute macro.
#[min_args(1)]
#[max_args(2)]
#[usage("#foo bar baz")]
fn foo(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult {
...
Ok(())
}
The same happened to creating groups, but with macro!
style flavour, which have become a compulsory step in registering your commands:
group!({
name: "fizzbuzz",
options: {
prefix: "fezz",
...
},
commands: [foo],
});
All .command
s and .on
s are thus replaced with simple calls to .group
:
framework.group(&FIZZBUZZ_GROUP); // !
! - procedural macros are functions that accept Rust code, return Rust code. The Rust code that the #[command]
(and similarly, group!
) macro generates is the function you supplied it with, and a static
instance of options that you've configured the command with. The static is assigned a suffixed, all uppercase version of the function’s name (or in the case of group!
, of the name
field). Hence this weird identifier from nowhere.
Book
To help new (and existing) users familiarise themselves with the library better, we have decided to write a book similar to one of Rust's official learning material to the language, The Book.
It's no ready yet, but we hope that on its release that it will clear misunderstandings (if any), explain the why and how of the library and put you in the right direction of Discord bot making!
Added
- [builder/model] Permit sending files through the
CreateMessage
builder. (@Roughsketch) c:5405ac2 - [client] Add Rich Presence parsing support (@zeyla) c:f7360e6
- [model] Add Slow Mode Rate (@Lakelezz) c:7512c19
- [voice] Voice reconnection (@FelixMcFelix) c:25cb595 c:4026d77 c:2f613c0 c:0a58e85
- [model] Add a position propagation method to Channel (@Erk-) c:59b4c60
- [misc.] Re-export
typemap::sharemap
(@zeyla) c:d2233e2 - [framework] Add new Check System (@Lakelezz) c:2969561
- [http/gateway] Rustls support (@Erk-) c:faa773a
- [model] Add news channel (@Lakelezz) c:1074b28
- [client] Add EventHandler for raw Events (@DarkKirb) c:2b453c3
- [model] Add millisecond accuracy to
ID.created_at()
(@DarkKirb) c:965fa7b - [http/gateway] Add Rustls and Native-TLS Backends (@Lakelezz) c:15e2c41
Changed
- [model] Make MessageUpdateEvent::embeds a Vec (@zeyla) c:00f465c
- [voice] Voice fixes, better API adherence, bitrate control, documentation (@FelixMcFelix) c:393a5ae
- [builder] Make builders mutably borrowed (@zeyla, @Flat, @Lakelezz, @Celti) c:1546171 c:6d87d71 c:b7a6fee c:b012ab7
- [utils] Make Message Builder use &mut self instead of self (@PvdBerg1998) c:1546171
- [misc.] Update
parking_lot
andmultipart
dependencies (@Kroisse) c:1e50d30 - [framework] Make sure
delimiter
clears current and default delimiters. (@Lakelezz) c:3f81cf3 - [framework] Underline command name and "Commands" in plain help (@hyarsan) c:87bc6ca
- [http] Replace
hyper
withreqwest
(@Lakelezz) c:86a8b60 - [client/gateway] Switch to tungstenite from rust-websocket (@zeyla) c:a5aa2a9
- [misc.] Update to Rust 2018 (@Lakelezz) [c:21518c8]
- [http/model/all] Remove global Cache and HTTP (@Lakelezz) [c:712cfa5] [c:3f0ea69]
- [client] Change the
Context::data
field to use anRwLock
(@Erk-) [c:661d778] - [cache] Pass old Message to
message_update
(@Mishio595) [c:40bf272] - [framework] Check for Ownership in Help System (@Lakelezz) [c:fa0376c]
- [framework] Improve Help Consistency (@Lakelezz) [c:51b48f4]
- [misc.] Adhere to Rust 2018's idioms (@Lakelezz) [c:5d6dc37]
- [client] Add different
Context::new
s based on feature-set. (@Lakelezz) [c:625b764] - [framework] Remodel
Args
's API (@acdenisSK) [c:c472ddd] - [framework] Rewrite the framework to attributes (@acdenisSK) [c:cc81e47]
- [framework] Handle Sub-Groups in the Help-System (@Lakelezz) [c:9b591ec]
- [voice] Fewer ffprobe calls when playing audio through ffmpeg (@FelixMcFelix) [c:5dff7eb]
- [voice] Optional impls and additional events for AudioReceiver (@FelixMcFelix) [c:d955df4]
- [voice] ClientConnect message handling (@FelixMcFelix) [c:fa11a30]
- [client] Pass the old voice state if the cache is enabled (@andreasots) [c:bd45e42]
- [http] Specify Header's Content Length as
0
(@eatsfoobars) [c:a713b40] - [voice] Switch to
audiopus
(@Lakelezz) [c:4af7a98] - [model] Make
enum
s non-exhaustive (@Lakelezz) [c:9cc8816] - [http] Make the HttpError Send+Sync (@Erk-) [c:6cfc0e1]
- [framework] Update
on_mention
to take aUserId
(@Celti) [c:d995fa0] - [utils] Simplify
from_rgb
, turn some of Colour's functions toconst
. (@hyarsan) [c:c149e36]
Fixed
- Fix ActivityFlags/ActivityTimestamps/ActivityParty deserialization (@zeyla) [c:0a77330] [c:d01eeae]
- Fix
MessageBuilder
's doctests (@Flat) [c:a3477a2]
Removed
v0.5.13
Thanks to the following for their contributions:
Breaking change
As unusual as it may sound for a patch version, we had to bump our minimum supported Rust version to 1.31.1 as a consequence of certain dependencies publishing releases containing uncompilable code for 1.25 rustc.
Added
- [misc.] Include the latest releases in CHANGELOG.md (@acdenisSK) c:201dab8 c:201bc56
- [misc.] Transition from Travis to Microsoft's Azure CI (@Erk-, @acdenisSK, @Lakelezz) c:68263ac c:bca2f4b c:3b8ae67 c:a0b1dd8 c:bd48ac5
Changed
- [docs] Compile, but do not run tests that were previously ignored (@MOZGIII) c:00990c0
- [misc.] Lock
cc
andbase64
dependencies to specific versions (@Lakelezz) c:bc3d978 - [general] Update Discord's welcome messages as of 2018-12-19 (@Erk-) c:e94388
- [voice] Fewer ffprobe calls when playing audio through ffmpeg (@FelixMcFelix) c:cfcd342 (Improperly credited under @acdenisSK due to a hiccup on Github's part.)
- [misc.] Define 1.31.1 as the new minimum Rust version (@acdenisSK) c:07e81b0
- [misc.] Revert commit c:bc3d978 (@acdenisSK) c:498e41c
- [misc.] Bump sodiumoxide to version 0.2 (@DoumanAsh, @MOZGIII) c:23ae9d8 (Commit done by @acdenisSK, but the intention to upgrade the version were Douman's and Mozgiii's)
Fixed
- [model] Fix "no-cache with http" feature combo of
has_role
(@Erk-) c:3899547 - [docs] Use a normal
main
to fix Rust 1.25 compilation (@acdenisSK) c:b469611 - [docs] Fix wording of
timestamp
's documentation (@acdenisSK) c:7c09cdd - [misc.] Fix typos and perform some language improvements (@ijks) c:88d914e
- [docs] Fix tests to work with default features without
cache
(@Lakelezz) c:e6694f2 - [voice] Fix connection error being thrown on leaving voice (@JellyWX) c:62a1aa2
v0.5.12
Done by @Erk-
❤️ Be at peace, be in love.
Make code, not language wars. ❤️
This is a celebratory release for Valentine's day, which we present to you with utmost courtesy.
(It is also @Erk-'s birthday. Lucky guy.)
Thanks to the following for their contributions:
Upgrade Path
typemap
does not need to be pulled in as a dependency for serenity anymore.
You can remove typemap
from your #[dependencies]
table in your Cargo.toml
and simply import its types from the prelude:
use serenity::prelude::{ShareMap, TypeMapKey};
Added
- [model] Add a position propagation method to
Channel
(@Erk-) c:2cb67df - [model] Implement
Into<u64>
andInto<i64>
for ID types (@Lakelezz) c:794393c - [general/prelude] Re-export
ShareMap
andKey
types fromtypemap
(@zeyla) c:b11b4e2 - [utils/MessageBuilder] Add support for spoilers (@acdenisSK) c:a56d014
- [general/example] Add usage of
colour
in example 11 (@Erk-) c:7066ed2
Changed
- [http] Limit users from requesting over 100 users (@Flat) c:8bf39a7
- [client/event-handler] Elaborate causes for
guild_member_removal
(@Lakelezz) c:dd75410
Fixed
- [model] Make
Region
’sJapan
-variant lowercase (fixes inconsistency) (@Lakelezz) c:065f55b - [model] Fix imports in
create_channel
’s example. (@acdenisSK) c:bca1530 - [framework] Fix aliases not being added to commands when using
cmd
. (@Mishio595) c:e8d0628 - [model] Fix no-cache compilation for
User::nick_in
. (@zeyla, @acdenisSK) c:11d5b72 c:98bece3 - [model] Fix
Emoji::url
to use.gif
for animated emoji (@mshenrick) c:ae0fc14 - [http] Correct query string in
Route::guild_ban_optioned
(@Mishio595) c:3c166e3 - [model] Fix
has_role
temporarily (@Erk-) c:204e0b9
By the way, here's some chocolate for reading these release notes 🍫
v0.5.11
Mini-release.
Thanks to the following for their contributions:
Added
- [framework] A callback handler that signifies a normal message was received (@Lakelezz) c:16bc3815
- [model] Convenience methods for getting a nickname (@Lakelezz) c:ed17114c
- [general] Add link for the
Voice on Windows
wiki entry to README.md (@Lakelezz) c:99b72358
Changed
- [general] Update the
base64
andsodiumoxide
dependencies (@DoumanAsh) c:5f9ed749 - [general/examples] Turn
unwrap
s toexpect
s and update to nested imports (@Lakelezz) c:d6c4beea
v0.5.10
This is a celebration release for the anniversary of the failed Gunpowder Plot enacted against King James of England and Scotland in 1605.
Image done by @Lakelezz
Thanks to the following for their contributions:
Known issues
Systems with OpenSSL 1.x.x installed will not be able to compile Serenity as it depends on an older version of OpenSSL (0.9.x). To circumvent this, you need to add a patch
section to your Cargo.toml
for ishitatsuyuki's fork, which is compatible with 1.x.x, like so:
[patch.crates-io]
openssl = { git = "https://github.com/ishitatsuyuki/rust-openssl", branch = "0.9.x" }
Upgrade Path
Discord no longer considers channels with the prefix nsfw-
in their name as NSFW. Per c:75fb5c04, the utils::is_nsfw
has been deprecated. Instead, the is_nsfw
methods on the channel structs (as in GuildChannel::is_nfsw
) are to be used for checking their nsfw-ness.
Added
- [general/contributing] Add guideline about maximum characters per line (@Lakelezz) c:12534348
- [cache] Add a write-lock configuration option (@Erk-) c:b2362dbb c:41ff44ba
- [framework] Prefix-only command (@Lakelezz) c:6a68f68e
- [framework] Add an option to disable bypassing checks for owners (@Lakelezz) c:c5285ae1
- [framework] Add a method for trimming the current argument (@acdenisSK, @Lakelezz) c:3b050f49 c:e763d80b
- [model] Parse the id out of any mention (@acdenisSK) c:d529cf79
- [utils] Add function to neutralise mentions (@Lakelezz) c:867a7447
Fixed
- [client] Compile the client without
cache
feature (@Erk-) c:176fde29 - [framework] Compile the framework without
cache
feature (@Bond-009) c:9f834b2b - [framework] Fix Default Command to inherit group-options (@Lakelezz) c:e32f9b57
- [model] Fix NSFW checks (@Lakelezz) c:75fb5c04
- [http/docs] Fix dead links (@Erk-) c:9d141bfc
Misc.
- [voice] Don't log event deserialization failures (@zeyla) c:08511dae
- [voice] Remove unused variable (@Proximyst) c:69931fe3
- [http] Remove inconsistent braces (@Proximyst) c:ccfa7fdc
- [cache/http] Change to UNIX line endings (@Erk-) c:8e401f03
- [docs] Typo fixes (@perryprog) c:9865d9cc
- [framework] Simplify code by removing negation (@Lakelezz) c:093a1bab
- [travis] Add
travis_wait
to extend build-time (@Lakelezz) c:5b6574c3
v0.5.9
This is a maintenance release fixing a number of bugs with a few miscellaneous
internal changes.
Thanks to the following for their contributions:
Upgrade Path
There are no deprecations or breaking changes.
Added
- [model] Add session start info in
BotGateway
(@zeyla) c:12bbc1a - [model] Add
Member::user_id
(@zeyla) c:669da40 - [framework] Suggest similar commands when using help (@Lakelezz) c:ce79f01
- [framework] add single group help (@Lakelezz) c:75f6516
Fixed
- [http] Fix routing for
http::create_private_channel
(regression from 0.5.6)
(@zeyla) c:30a325e - [http] Fix
GuildChannel::_permissions_for
on no-cache builds (regression
from 0.5.8) (@zeyla) c:e59f766 - [http] Change HTTP bulk delete from DELETE to POST (regression from 0.5.6)
(@Mishio595) c:ebbc324 - [framework] Make
is_command_visible
work with DMs (@Roughsketch)
c:7295079 - [utils] Add newline in
MessageBuilder::push_codeblock_safe
(@zeyla)
c:e66812a - [framework] Fix
has_correct_permissions
when no guild is available
(@Lakelezz) c:19c65bd - [framework] Check if bots are ignored before dispatching
unrecognised_command
(@Lakelezz) c:966cb3e - [framework] Fix group prefix ambiguity in help (@Lakelezz) c:f01e6e3,
c:c49e02c - [framework] Add missing usage on plain help (@Lakelezz) c:823b829
- [framework] Add usage sample back to help (@Lakelezz) c:82dbff2
- [framework] Check if group is empty and exclude if so (@Lakelezz)
c:4778e69 - [model] Message: avoid permission checks in non-guild channels (@zeyla)
c:3fbab76
Misc.
- [docs] Fix a broken link in README (@Mishio595) c:41b6e24
- [docs] Properly link to User in Game docs (@zeyla) c:dec3f13
- [http] Move low-level http functions to
http::raw
and re-export (@zeyla)
c:6157f61 - [utils] Add more unit tests for
MessageBuilder
(@zeyla) c:14c6099 - [framework] Refactor help (@Lakelezz) c:28cdc53
- [docs] Update client docs to not say user token (@perryprog) c:6ca4bea
- [framework] Add tests for help (@Lakelezz) c:79d8843
- [model] Remove cache requirement on
Message::is_private
(@zeyla)
c:fe69ef0
v0.5.8
Thanks to the following for their contributions:
Upgrade Path
Per c:71edc3a, methods on ID structs like ChannelId::find
have been
deprecated and replace with UserId::to_channel_cached
. Similarly, methods like
GuildId::get
have been replaced with GuildId::to_partial_guild
. While the
original methods have not been removed, they have been deprecated.
Added
- [utils] Add
Colour::hex
(@Mishio595) c:8bec4af
Fixed
- [http] Fix various incorrect routes (@Lymia) c:826220f
- [docs] Fix all the dead links in the docs (@Erk-) c:40053a7
- [voice] Stop attempting to send silent frames (reverts a commit) (@zeyla)
c:0bbe5f5