All notable changes to this project will be documented in this file. This project mostly adheres to Semantic Versioning.
0.10.5 - 2021-04-04
Thanks to the following for their contributions:
- [model] Add support for stage channels (@drklee3) c:4018632
- [http/model/builder] Allow editing and deleting messages from webhooks (@acdenisSK) c:8d0b307
- [model] Add support for
GuildChannel::{rtc_region, video_quality_mode}
fields (@drklee3) c:95c2f78 - [command_attr] Add a way for joining lines in
#[doc]
comments using\$
(@acdenisSK) c:dbc40cb c:cc184a4 - [model] Add
User::public_flags
field (@miqbalrr @acdenisSK) c:b999f46 c:8ab0305 - [model] Add a
Parse
trait for some model types (@kangalioo) c:3088652 - [command_attr] Add documentation for the
#[hook]
macro (@acdenisSK) c:412f5a9 - [model] Add new Emoji fields and adjust existing ones (@acdenisSK) c:8dfd97d
- [model] Apply changes to interaction response types and add a new interaction type (@acdenisSK) c:eba755c
- [builder] Update
EditGuild
to match current Discord API (@Lakelezz) c:feda47c - [misc] Signify code that needs the
collector
feature (@acdenisSK) c:a04291f - [framework] Make the
Suggestions::{as_vec, join}
methods public (@Daggy1234) c:4186996 - [gateway] Alter
Activity
constructor methods to useToString
(@acdenisSK) c:859355c - [model] Improve conformity and fix updating certain fields for
Member
(@acdenisSK) c:909bf8e
- [command_attr] Fix a case of iterator invalidation when moving
#[doc]
attributes (@acdenisSK) c:166c248 - [http] Escape hashes in HTTP reaction methods (@acdenisSK) c:17233a2
- [gateway] Reconnect in event of failed ShardActions (@FelixMcFelix) c:03dd250
- [framework] Do not invoke the help command in DMs if
allow_dm
is false (@acdenisSK) c:16e7556 - [examples] Fix tracing compilation error in example 7 (@acdenisSK) c:3aa6aae
0.10.4 - 2021-03-03
Thanks to the following for their contributions:
- [misc] Fix invalid usage of
#[doc(cfg)]
(@acdenisSK) c:b192609
0.10.3 - 2021-03-03
Thanks to the following for their contributions:
- @AriusX7
- @acdenisSK
- @aria-7553
- @baeuric
- @cab404
- @Daggy1234
- @DrBluefall
- @dapper-gh
- @drklee3
- @drp19
- @Lakelezz
- @lapin-b
- @merlleu
- @nickelc
- @Prof-Bloodstone
- @SinsofSloth
- @s0lst1ce
- @Th3-M4jor
- [framework/command_attr] Rename
#[doc]
attributes to#[description]
for groups (@acdenisSK) c:1cbc935 - [model] Add missing variants to
MessageType
(@merlleu) c:8f38985 c:e5ae947 - [model] Add Requiring Guild Presences Intent Note (@drklee3) c:136adef
- [misc] Add clippy lint to deny let underscore binding of values which must be used (@Th3-M4jor) c:53d5007
- [misc] Add clippy lint for denying missing error documentation (@Th3-M4jor) c:dcc1ac4
- [framework] Document help-macro attributes
#[lacking_conditions]
and#[wrong_channel]
(@aria-7553) c:8931c4c - [model] Add new fields for the
Member
model (@acdenisSK) c:810b033 - [misc] Add a clippy lint for denying the usage of
unwrap()
(@Th3-M4jor) c:3f93c87 - [model] Add interaction create methods to
Guild
,GuildId
,PartialGuild
, andInteraction
(@Th3-M4jor) c:abfbb9f - [builder] Allow adding permissions when editing a channel (@baeuric) c:abe955f
- [builder] Add builders for creating interactions (@Th3-M4jor) c:0d743fd
- [client] Allow users to reuse
Http
when building theClient
(@acdenisSK) c:0e2b648 - [builder] Add builders for interaction responses (@SinsofSloth) c:835e826
- [model] Ignore Missing Cache Items on Permission Checks (@Lakelezz) c:2812236 c:75b404a
- [framework] Capture sub-commands and aliases in
similar_commands
(@Lakelezz) c:5892db2 - [framework] Handle nested sub-commands in help (@Lakelezz) c:3db32fb
- [model] Don't require the
cache
feature forMembersIter
andGuildId::members_iter
(@AriusX7) c:4ed30c3 - [misc] Bump dependencies to make them build with minimal versions (@nickelc) c:53b2dc5
- [misc] Update to
tracing
0.1.23 (@nickelc) c:2a21347 - [builder] Use vectors for passing permissions in the builders' documentation (@acdenisSK) c:2e50a12
- [misc] Update the contributing guide to reflect the state of the project (@acdenisSK) c:7e8620f
- [model] Change the type of the
embeds
field inMessageUpdateEvent
back toEmbed
(@cab404) c:8133a43 - [misc] Enable the
log
feature fortracing
(@DrBluefall) c:73e6d8a - [examples] Make
ShardManagerContainer
in thee06_sample_bot_structure
example public (@Daggy1234) c:dfd0b32 - [misc] Format the repository and add a workflow for formatting and linting (@acdenisSK) c:9bbb25a
- [client] Ignore the
msg
parameter when creating a tracing span (@acdenisSK) c:cb6b528
- [model] Fix the type of
token
and add fieldkind
toWebhook
(@acdenisSK) c:de72951 - [framework] Skip the
Available
segment in help if empty. (@Lakelezz) c:6b6e5fe - [model] Check if Private Channel Before Returning
NotAuthor
(@Lakelezz) c:1ab52a0 - [framework/command_attr] Preserve documentation comments for the help command (@acdenisSK) c:83360f8
- [model] Fix typo on
MessageCollector
(@s0lst1ce) c:291e4f2 - [model] Fix outdated link to example 5 in
Client::data
's documentation (@aria-7553) c:2be89e2 - [framework] Add missing verb 'be' in
Configuration::no_dm_prefix
's documentation (@aria-7553) c:4477690 - [examples] Update comments in the 7th example to mention
tracing
(@acdenisSK) c:10de463 - [misc] Fix commit links for the v0.9.3 release (@acdenisSK) c:5457cda
- [gateway] Fix
WebSocketGatewayClientExt::send_chunk_guild
to not get disconnected by Discord's gateway (@lapin-b) c:2f835a3 - [gateway] Fix token logging from
WebSocketGatewayClientExt::send_resume
(@Prof-Bloodstone) c:2854e6b - [builder] Fix a typo in the create interaction builder (@drp19) c:5254e2b
- [examples] Fix the owner check in the
e05_command_framework
example (@dapper-gh) c:e59314e
0.10.2 - 2021-01-09
Thanks to the following for their contributions:
0.10.1 - 2021-01-07
Thanks to the following for their contributions:
0.10.0 - 2021-01-06
Thanks to the following for their contributions:
- @AgathaSorceress
- @acdenisSK
- @Baev1
- @casey
- @chocological00
- @Daggy1234
- @drklee3
- @FelixMcFelix
- @ikkerens
- @JellyWX
- @james7132
- @KamranMackey
- @Lakelezz
- @LavaToaster
- @nickelc
- @peppizza
- @SadiinsoSnowfall
- @SinsofSloth
- @sam-kirby
- @Th3-M4jor
- @ThatsNoMoon
- @thebongy
- @Wolvereness
- [client/voice] Document VoiceGatewayManager interface (@FelixMcFelix) c:7647e1e
- [misc] Describe the
unstable_discord_api
feature (@acdenisSK) c:0b1fc27 - [gateway] Log unhandled errors when handling events in the gateway (@LavaToaster) c:2e8f968
- [model/http] Add Slash Command Gateway and REST API Support (@Baev1) c:649f8f2
- [framework] Add Max Delay Limits, Delay Hook, and
RateLimitInfo
(@Lakelezz) c:aed3886 - [model] Add partial application information to the Ready event. (@KamranMackey) c:d4caf12
- [model] Add Default Limit And Validate When Fetching Members (@SadiinsoSnowfall) c:f1204a8
- [model] Add Guild::banner_url() and support animated guild icons via Guild::icon_url() (@drklee3) c:2ef6da8
- [model] Add sync_id and session_id fields to Activity. (@KamranMackey) c:6240625
- [framework] Add Reverting and Awaiting Bucket Rate Limits (@Lakelezz) c:1589475
- [model] Add support for stickers (@drklee3) c:1b4d408
- [framework] Support custom colours in the help command attributes (@acdenisSK) c:fb1f0bf
- [model] Add a helper method for partial comparing unicode reaction emojis (@Th3-M4jor) c:46c74e9
- [framework] Add summary as a brief description for groups (@Lakelezz) c:ce66f8e
- [framework] Add support for displaying sub-commands in plaintext help (@KamranMackey) c:977fa19
- [framework] Implement the
Display
andError
traits for the checkReason
(@peppizza) c:2c9c64f - [model] Add a helper method for comparing unicode reaction emojis (@Th3-M4jor) c:0de77e7
- [framework] Add sub-command support to help (@Lakelezz) c:707752c
- [model] Add functions to use inlined replies on
Message
(@Lakelezz) c:35c8f7b - [model] Implement inline replies (@ikkerens) c:e521849
- [voice] Implement Songbird driver configuration (@FelixMcFelix) c:4fdbe98
- [model] Add
guild_id
,member
, andself_video
fields to VoiceState model (@sam-kirby) c:7034564 - [http] Allow sending files with webhooks (@JellyWX) c:99c27fe
- [model] Add associated constants to
EventType
and conversion methods betweenEvent
(@casey) c:f3e4a6b
- [model] Change
Mentionable
to return a struct that implementsDisplay
(@Wolvereness) c:2624170 - [misc] Update to tokio 1.0 and reqwest 0.11 (@nickelc) c:a27d7bb
- [model] Point to
User::nick_in
inMessage::author_nick
's documentation (@Wolvereness) c:51dc943 - [model] Improve permission checking (@ThatsNoMoon) c:dbb3669
- [model] Change signatures of
Emoji
methods to requireCache
andHttp
. (@Lakelezz) c:6aa2841 - [model] Check @ everyone and user permission overwrites for uncached users (@ThatsNoMoon) c:12d1b22
- [framework] Rework buckets to offer fine-grained control (@Lakelezz) c:309bd5d
- [framework] Clarify framework configuration dynamic_prefix docs (@drklee3) c:0ca5813
- [framework] Remove only one leading space in command descriptions (@acdenisSK) c:216d579
- [misc] Increase MSRV to 1.48 (@acdenisSK) c:e74fd6f
- [docs] Replace links with intra-doc links (@nickelc) c:69cae50
- [framework] Replace
CheckResult
with a simpleResult<(), Reason>
(@Lakelezz) c:6e39727 - [model] Switch from
u64
tousize
to represent overflow in a message (@SadiinsoSnowfall) c:b7b0318 - [example] Make the
ShardManagerContainer
type in example 6 public (@Daggy1234) c:59e09d0 - [model] Expose guild id in the message delete event handlers (@SadiinsoSnowfall) c:08bd87f
- [voice] Move songbird and examples relying on it to the new repository (@acdenisSK) c:be6eefe
- [voice] Update versions for twilight and serenity-voice-model in songbird (@FelixMcFelix) c:b3a71db
- [model/framework] Retrieve the member from HTTP if missing in cache when calculating permissions (@JellyWX) c:6dd66e1
- [docs] Update the version in lib.rs to rely on any patch version in 0.9 (@acdenisSK) c:1606e09
- [misc] Credit the real author of the Serenity.await commit (@acdenisSK) c:2587e6a
- [voice] Document intents for Songbird (@FelixMcFelix) c:49be2ab
- [framework] Apply cooked attributes on generated functions (@acdenisSK) c:879ae4b
- [misc] Bump MSRV to 1.43.0 (@nickelc) c:477925f
- [model] Change the use of the
#[doc]
attribute onVerificationLevel
to doc comments (@nickelc) c:2b1e2fc - [gateway] Use the info level when notifying the user that a shard is running (@acdenisSK) c:49ebbd7
- [client/gateway/http/model] Introduce initial changes for v8 of the gateway (@james7132) c:d74a0a6
- [voice] Voice Rework -- Events, Track Queues (@FelixMcFelix) c:fd6f08b
- [misc] Reduce size of the crate by only including files that are necessary (@nickelc) c:a836180
- [http] Fix local ratelimit bug (@chocological00 @Lakelezz) c:3d56a57 c:4f07798
- [http] Fix path to the HTTP endpoint of interaction responses (@SinsofSloth) c:fcb1daa
- [model] Fix deserialization of interactions (@acdenisSK) c:b42591c
- [model] Fix doc comments for
ReactionCollector
(@Th3-M4jor) c:7684323 - [model] Fix the stated order of
ChannelId::messages_iter
(@acdenisSK) c:03a1f97 - [model] Use
ApplicationId
instead ofu64
inMessageApplication
(#1158) (@sam-kirby) c:66e7add - [model] Use guild splash hash for splash_url() instead of icon hash (@drklee3) c:d3ab6a7
- [model/http] Handle 200 Response when modifying Members on API v8 (@drklee3) c:8471f5b
- [framework] Check for discrepancies in prefixless groups (@acdenisSK) c:692e984
- [framework] Check a sub-command's parent first. (@Lakelezz) c:20043d4
- [model] Percent encode audit log reasons to prevent missing characters or truncation (@drklee3) c:02916dc
- [model] Reverse the message buffer before returning messages from it (@acdenisSK) c:e49fae4
- [misc] Fix clippy warnings (@nickelc) c:a7ab03e c:7ad3abe c:a42bba2 c:3282d77
- [model] Fix voice region deserialization (@KamranMackey) c:ba85299
- [framework] Avoid cloning the entire guild object upon a command invocation (@acdenisSK) c:ac23e19
- [framework] Fix typo in check-docs. (@Lakelezz) c:5fea8e4
- [example] Fix typo of the strikethrough option in the framework example (@thebongy) c:177adbf
- [model] Fix url for animated emojis in
EmojiIdentifier
(@AgathaSorceress) c:e8ae00f - [model] Use the correct bits for privileged intents (@FelixMcFelix) c:2225c8d
- [voice] Handle Voice close codes, prevent Songbird spinning WS threads (@FelixMcFelix) c:79c506e
- [model] Fix serialization of
PermissionOverwrite
s (@acdenisSK) c:8fb18e6 - [model] Correctly set gateway to v8 and fix
Permission
deserialisation (@FelixMcFelix) c:b1bcc67 - [framework] Allow missing documentation for generated statics and functions (@acdenisSK) c:9cc30c3
- [misc] Remove
#[deprecated]
items. (@Lakelezz) c:aca54ac - [client] Remove unused event handlers for groups (@acdenisSK) c:52f9dca
- [framework/command_attr] Remove unnecessary
extern crate
incommand_attr
(@acdenisSK) c:d6984a8 - [framework/command_attr] Remove recursion limit in
command_attr
(@acdenisSK) c:4729f26 - [misc] Remove remaining instances of private
_nonexhausive
fields (@KamranMackey) c:ac66a54
0.9.4 - 2021-01-07
Thanks to the following for their contributions:
- [misc] Fixate
command_attr
version to 0.3.2 (@acdenisSK) c:b03df91
0.9.3 - 2020-12-18
Thanks to the following for their contributions:
- [command_attr/framework] Support custom colours in the help command attributes (@acdenisSK) c:1cc66b3
- [framework] Fix invocation by defaulting ticket limit to 1. (@Lakelezz) c:1047eac
- [framework] Fix handling sub-commands in the help-system. Adds an example command with sub-command to the command framework example as well. (@Lakelezz) c:fac94f2
- [framework] Fix not setting
set_time
by default. (@Lakelezz) c:5399d44 - [framework] Check for discrepancies in prefixless groups (@acdenisSK) c:75feff2
- [command_attr/framework] Remove only one leading space in command descriptions (@acdenisSK) c:8f5a2e9
- [model] Reverse the message buffer before returning messages from it (@acdenisSK) c:1dba16a
- [model] Fix incorrect documentation for the
MessageTooLong
error (@SadiinsoSnowfall) c:8b42790
0.9.2 - 2020-11-28
Thanks to the following for their contributions:
- [misc] Update the version in lib.rs to rely on any patch version in 0.9 (@acdenisSK) c:85e5722
- [misc] Credit the real author of the Serenity.await commit (@acdenisSK) c:757e0d6
- [framework] Avoid cloning the entire guild object upon a command invocation (@acdenisSK) c:bc78991
- [model] Only add roles that the member does not possess when calling
Member::add_roles
(@acdenisSK) c:e6fd09b
0.9.1 - 2020-11-08
Thanks to the following for their contributions:
- [gateway] Use the info level when notifying the user that a shard is running (@acdenisSK) c:7ea8098
- [command_attr] Allow missing documentation for generated statics and functions (@acdenisSK) c:182ee78
- [model] Change the use of the
#[doc]
attribute onVerificationLevel
to doc comments (@nickelc) c:58e3d49 - [misc] Reduce size of the crate by only including files that are necessary (@nickelc) c:a836180
- [command_attr] Apply cooked attributes on generated functions (@acdenisSK) c:61597d6
0.9.0 - 2020-10-30
Thanks to the following for their contributions:
- [client] Mention the required intents for certain events (@nitsuga5124) c:c9971b6
- [gateway] Add support for filtering by user ids when requesting guild chunks (@james7132) c:0d9b821
- [gateway] Change
Shard::chunk_guilds
tochunk_guild
(@james7132) c:50d9643 - [framework] Use
~
as a default command prefix (@Qeenon) c:d9e9bf7 - [utils] Make
utils::shard_id
accept the guild id withimpl Into<u64>
(@JellyWX) c:85b5489
0.9.0-rc.4 - 2020-10-24
Thanks to the following for their contributions:
- [misc] Increase the type length limit (@acdenisSK) c:7e55a0e
0.9.0-rc.3 - 2020-10-23
Thanks to the following for their contributions:
- @AriusX7
- @acdenisSK
- @Baev1
- @Flat
- @FelixMcFelix
- @ikkerens
- @leumasme
- @MonliH
- @nickelc
- @nitsuga5124
- @Prof-Bloodstone
- @peppizza
- @Qeenon
- @TheElec
- @tmcarr
- @u5surf
- [misc] Switch to Github Actions (@acdenisSK) c:5bb8342 c:a1b3c8d
- [model] Add missing fields to
GuildMembersChunkEvent
and add nonce toShardMessenger::chunk_guilds
(@TheElec) c:8c30b40 - [model] Implement
create_invite
onChannelId
(@acdenisSK) c:c0c2137 - [client] Derive
Clone
forCacheAndHttp
(@acdenisSK) c:2b66828 - [examples] Update example 07 to use tracing and dotenv (@nitsuga5124) c:2386690
- [examples] Add Parallel Loops example. (@nitsuga5124) c:b38cdf5
- [examples] Add an example for client data. (@nitsuga5124) c:3fe8056
- [http] Add methods to the http error type to query the presence of variants and to return the status code (@Baev1) c:7ef12ee
- [http] Add methods to start and stop typing (@AriusX7) c:bcf8249
- [examples] Gracefully shutdown all shards upon receiving Ctrl-C in example 7 (@peppizza) c:860a2c5
- [misc] Update and reduce dependencies (@nickelc) c:bba7d55 c:35e2a40 c:6577838
- [examples] Replace several instances of
if let Err
with?
in example 5 (@peppizza) c:b1187ce - [examples] Use the
writeln!
macro instead ofwrite!
in example 5 (@peppizza) c:c6150ae - [http] Prevent discord token from being logged (@Prof-Bloodstone) c:5cc67c3
- [misc] Replace instances of
super::super
with absolute imports (@nickelc) c:47e2f34 - [examples] Directly link
TypeMap
to its crate (@nickelc) c:519b67e - [builder] Allow setting the embed builders directly (@Prof-Bloodstone) c:b522e83
- [model] Change order rules of MessagesIter from new to old (@Qeenon) c:aa589da
- [voice] Limit
tokio/process
andtokio/udp
to the voice feature (@nickelc) c:d514806 - [misc] Update
base64
andtypemap_rev
dependencies to their latest versions (@Qeenon) c:ebd1241 - [examples] Update example 05 to specifically get the current bot id (@Flat) c:de085ff
- [voice] Update voice cipher to the latest version (@FelixMcFelix) c:87df95f
- [framework] Change the default help text to use the word 'server' (@acdenisSK) c:f0cfc0e
- [examples] Fix a typo in the examples' README (@leumasme) c:186fd6c
- [examples] Fix a small typo in example 14 (@MonliH) c:3467ddc
- [model] Deserialize the correct data from the
GUILD_DELETE
event (@acdenisSK) c:b044b6d - [model] Correctly update the guild instance in the members chunk event (@acdenisSK) c:42da202
- [framework] Ignore empty command arguments (@acdenisSK) c:b9252a5
- [misc] Fix broken links & related doc comments (@nickelc) c:83e1d12
- [misc] Fix all clippy warnings and deprecate
Client::new
(@ikkerens) c:ffc2997 - [examples] Send the shutdown message earlier in the sample bot example (@tmcarr) c:2d365d0
- [model] Fix
ReactionType
'sDisplay
impl to support animated emojis (@u5surf) c:f0a3947
- [model] Remove unnecessary
Option
fromMessage::channel_mentions
(@nitsuga5124) c:626bdfd
0.9.0-rc.2 - 2020-09-27
Thanks to the following for their contributions:
- [model] Add the new 'competing in' activity type (@nitsuga5124) c:ebc2cc7
- [model] Add
create_webhook
methods toGuildChannel
. (@nitsuga5124) c:fb44a15 - [meta] Add cargo-make support for building the examples. (@nitsuga5124) c:b137f51
- [model] Add new guild features to the documentation (@nitsuga5124) c:f2191d5
- [model/client] Add support for invite events (@acdenisSK) c:7146fd7
- [model] Retrieve the member from HTTP if it is missing in the cache (@acdenisSK) c:a3f9186
- [framework] Call the
should_fail_common
check earlier (@acdenisSK) c:bab4b24 - [meta] Update the MSRV to 1.40 (@acdenisSK) c:3f5882c
- [model] Use
#[non_exhaustive]
where applicable (@LikeLakers2) c:9ee42f1 - [meta] Switch from log to tracing. (@nitsuga5124) c:78dd862
- [utils] Make
parse_emoji
accept animated emojis (@bdashore3) c:66e05ea - [meta] Insert the shard manager in example 7 (@acdenisSK) c:7c2d4f7
- [client] Fix Tungstenite IO error being discarded in ws_impl (@ikkerens) c:49c1603
- [meta] Fix feature dependencies in examples 2, 3, 4, 9, 11 (@Deebster) c:9e77154
- [framework] Temporarily fix the permissions check in the framework (@acdenisSK) c:88af7cf
- [model] Fix ReactionType not remembering animated status. (@ikkerens) c:2eac499
- [framework] Fix parsing of commands that have requirements (@acdenisSK) c:323875f
- [meta] Fix example 5's retrieval of owners when the bot belongs to a team (@nitsuga5124) c:5c0c045
- [framework] Fix bucket duration order (@acdenisSK) c:5805539
- [voice] Update Voice WS Sender on reconnect. (@FelixMcFelix) c:659448b
- [gateway] Fix shutdown regression (@ikkerens) c:fa03b75
- [framework] Do not emit dispatch errors when ignoring bots or webhooks (@acdenisSK) c:41698b6
0.9.0-rc.1 - 2020-09-03
Thanks to the following for their contributions:
- [misc] Add latency to the general group in the 5th example (@acdenisSK) c:c8dacf2
- [model] Add
MessagesIter
andmessages_iter
(#942) (@AriusX7) c:a7e2f74 - [model] Implement
Display
forPermissions
(#939) (@AriusX7) c:1eb2714 - [model/http] Implement endpoints for getting emojis of a guild (#937) (@acdenisSK) c:2a1c385
- [client] Implement AsRef for ShardMessenger (#936) (@ThatsNoMoon) c:a9c9caa
- [builder] Implement a builder for allowed mentions (#931) (@nitsuga5124) c:59fb7b9
- [framework/command_attr] Fix if condition that inspects the name of a check (@acdenisSK) c:7d8c806
- [framework] Consider
Group
checks when displaying commands in help (#946) (@AriusX7) c:f00f1c0 - [model] Remove the colon from the message generated by
Message::reply
(#943) (@Qeenon) c:13bf356 - [model] Remove usage of chrono in a few places and switch from FixedOffset to Utc (#935) (@qm3ster) c:ed7b18e
- [framework] Abstract CommandResult type (#934) (@bdashore3) c:cfbd0be
- [misc] Update async-tungstenite to v0.8 (#930) (@nickelc) c:3d44d66
- [misc] Remove unused dependencies (@acdenisSK) c:b414f29
0.9.0-rc.0 - 2020-08-11
It has long been .await
ed for, but it's finally here! Serenity now leverages async
functions, thanks to the tokio
runtime.
A big thanks goes to @Lakelezz. Without the dedication to her efforts, it wouldn't have been possible to make the switch easily.
As that is a huge change, among other changes, this is actually a testing release. It is encouraged to consumers of this release to provide feedback for any warts you might encounter, be it missing features, or bugs. One important bug is the OOM bug. After a period of time has passed since the bot connected, there might be a big random spike in memory usage, prompting the OOM killer to shutdown the bot's process. It is unknown where the spike comes from, or when exactly does it occur. It doesn't happen to every bot either. If you find your bot suddenly using a lot of memory, or being killed, please let us know by opening an Issue.
Thanks to the following for their contributions:
- @acdenisSK
- @asherkin
- @bdashore3
- @DimiDimit
- @jmgao
- @Lakelezz
- @MaxOhn
- @mendess
- @mjsir911
- @mysteriouspants
- @NieDzejkob
- @NilsIrl
- @nitsuga5124
- @Th3-M4jor
- @tverghis
- [model] Add
nick
field toPartialMember
(@asherkin) c:28f9f8a - [model] Add teams support (@nitsuga5124) c:5a6979a
- [model] Add
mentions_current_user
helper (@mysteriouspants) c:e049bc1 - [model/client] Add the
nonce
field toGuildMembersChunk
and the event handler (@mjsir911) c:614f99a - [voice] Add
self_stream
field toVoiceState
(@DimiDimit) c:c60f397 - [model] Add a method to retrieve a webhook's URL (@nitsuga5124) c:5931d1c
- [model] Add a method to retrieve a link to a message (@acdenisSK) c:a92ca08
- [command_attr] Add the delimiters option to the documentation (@acdenisSK) c:1594a3e
- [model] Add pagination for CurrentUser::guilds (@NilsIrl) c:9eadffa
- [model] Add methods to disconnect a member from a voice channel (@mendess) c:4e8e40b
- [model] Add
GuildId::name()
(@tverghis) c:d99bee9
- [misc] Update rustls dependency to 0.18 (@acdenisSK) c:3dda20d
- [all] Serenity.await (@Lakelezz) c:5df4c6d
- [misc] Address the renaming of the lavalink project (@acdenisSK) c:802df92
- [utils] Replace the in-house typemap implementation with
typemap_rev
(@bdashore3) c:c1c7300 - [misc] Apply copyright to all people who have contributed to Serenity (@acdenisSK) c:287245a
- [model] Make
Message::reply
take a content implementingstd::fmt::Display
(@nitsuga5124) c:00683ef - [framework] Expose CustomisedHelpData fields, improve help strikethrough message attributes. (@jmgao) c:0d72b6e
- [framework] Return
Option<Message>
in help command functions (@MaxOhn) c:4472dec - [model] Make
Message::react
return itsReaction
(@NieDzejkob) c:e7eb52d - [model] Check the cache for an existing private channel when creating a new one (@NieDzejkob) c:94d22c3
- [framework] Replace
CommandError
with an alias toBox<dyn Error>
(@acdenisSK) c:a406d48 - [misc] Mention projects that extend the functionality of the library instead (@acdenisSK) c:9f75c09
- [model] Adjust the ban methods to be consistent with the kick methods (@acdenisSK) c:8628b2a
- [http] Inject the guild id into the roles returned by the http client (@acdenisSK) c:5edd11d
- [client] Replace
&mut Context
with&Context
(@Th3-M4jor) c:3e4294b
- [model] Restrict mention parsing to be specific to the type of id (@acdenisSK) c:dd580fb
- [framework] Fix
unrecognised_command()
not working if the last added group has prefixes (@nitsuga5124) c:8040fa5 c:760ed71 c:21a5d8e - [misc] Remove unnecessary feature gates and fix incorrect ones (@acdenisSK) c:ed61459
- [model] Remove
U: Into<UserId>
type parameter forpartial_guild::edit_member()
(@nitsuga5124) c:4227a52 - [misc] Remove Zeyla Hellyer as an author of Serenity (@acdenisSK) c:9cfc410
- [misc] Remove the matches developmental dependency (@acdenisSK) c:2418edd
- [misc] Remove usages of mem::replace where its return value is unused (@acdenisSK) c:3135e0f
0.8.9 - 2020-12-18
Thanks to the following for their contributions:
- [framework] Fix invocation by defaulting ticket limit to 1. (@Lakelezz) c:eaead53
- [framework] Fix handling sub-commands in the help-system. Adds an example command with sub-command to the command framework example as well. (@Lakelezz) c:b96529e
- [model] Fix incorrect documentation for the
MessageTooLong
error (@SadiinsoSnowfall) c:bb04fad
0.8.8 - 2020-11-28
Thanks to the following for their contributions:
- [framework] Backport changes in the framework discrepancy check from 0.9.x (@acdenisSK) c:72f287c
0.8.7 - 2020-08-11
This is a small release to publish a bunch of fixes the current
branch has accumulated.
Thanks to the following for their contributions:
- @7596ff
- @acdenisSK
- @dmarcoux
- @FelixMcFelix
- @fenhl
- @jmgao
- @johnchildren
- @ks129
- @s0lst1ce
- @SOF3
- @tarcieri
- @tweirtx
- @zack37
- [misc] Use a cargo workspace to compile the examples efficiently (@acdenisSK) c:6b1021f
- [misc] Prepend 'e' to all example names (@acdenisSK) c:9f848af
- [misc] Update dependencies rustls, tungstenite, webpki-roots, parking_lot, and base64 (@johnchildren) c:912d759
- [misc] Update the Discord invite link (@acdenisSK) c:1b195d7
- [model] Support animated emojis in Emoji's Display impl (@zack37) c:08d0608
- [voice] Use the
xsalsa20poly1305
crate for encryption in voice (@tarcieri) c:3965e00 - [model] Consider nickname mentions in
Message::content_safe
(@ks129) c:46db84a - [misc] Update almost all instances of discordapp.com to discord.com (@s0lst1ce) c:f98e61e
- [model] Fix
User::nick_in
unconditionally returning if the cache is passed (@acdenisSK) c:9c198ed - [CI] Fix the Linux CI job by adding the missing system dependency (@tweirtx) c:550a63c
- [misc] Address some clippy warnings (@dmarcoux) c:2a54410
- [utils] Preserve hostname when escaping invite links (@fenhl) c:7dd01eb
- [voice] Fix
.mute(...)
not preventing the bot from sending frames. (@FelixMcFelix) c:638780e - [nidek] Fix doc-link to the
Message::guild_id
field in theMessage::guild
method (@SOF3) c:84b04ba - [framework] Fix check behaviour in the help command (@jmgao) c:e000833
- [model] Fix the documentation order of
permissions_for_role
andpermissions_for_user
(@7596ff) c:9356a5c
0.8.6 - 2020-04-26
This release prevents a loop when requesting a restart of a Shard, resulting in the Shard hanging forever.
Thanks to the following for their contributions:
0.8.5 - 2020-04-22
The last bugfix release was ironically broken because of a slight oversight. This release fixes that.
Thanks to the following for their contributions:
0.8.4 - 2020-04-18
This release fixes Serenity's handling of Discord's new rebalances. You should no longer encounter many Ready events.
Thanks to the following for their contributions:
0.8.3 - 2020-04-13
Another bugfix release. This time it fixes a panic that would occur when using a string delimiter and messages contained a unicode character after the delimiter.
Thanks to the following for their contributions:
- [framework] Fix a panic when parsing unicode characters after a string delimiter (@acdenisSK) c:7f04ecf c:9ebd779
0.8.2 - 2020-04-11
This is a release for a critical bugfix.
In an attempt to fix one thing, other things broke. Any time Serenity made a request to a POST or PUT endpoint (such as creating reactions or banning users), Discord would return HTTP 400. This release corrects that.
Thanks to the following for their contributions:
0.8.1 - 2020-04-02
This is the last release for the 0.8.x series. 0.9.x will contain async/await support!
It is mostly comprised of bugfixes and quality of life changes.
While this is a minor release, a change that is technically breaking has been included. Some MessageBuilder
methods were forgotten about when changing builders to mutably borrow in 0.8.0. This release fixes that.
Thanks to the following for their contributions:
- @acdenisSK
- @bikeshedder
- @Elinvynia
- @KamranMackey
- @Lakelezz
- @MaxOhn
- @natsukagami
- @nitsuga5124
- @Noituri
- @NovusTheory
- @TitusEntertainment
- @vivianhellyer
-
[model] Add
guild_id
into theReaction
model struct (@Elinvynia) c:820d50e -
[model] Add missing
guild_id
to various events (@NovusTheory) c:3ca41fd -
[model] Add support for client statuses (@KamranMackey) c:5f9a27a
-
[http] make error module public (@vivianhellyer) c:d2b19a2
-
[builder] Reexport
Timestamp
from the builder's module. (@acdenisSK) c:3a313c8 -
[model] Implement various
kick_with_reason()
methods (@nitsuga5124) c:5b0e9f3
-
[framework] If finding the argument fails, return to the original position (@acdenisSK) c:e005ef1
-
[framework] Display groups without commands in help. (@Lakelezz) c:d6b0038
-
[model] Make
Member::distinct()
show the discriminator as a 4-digit number (@natsukagami) c:a23acc7 -
[utils] &mut self instead of mut self for MessageBuilder methods (@MaxOhn) c:91f10dd
-
[utils] Implement
Color
type alias toColour
(@Elinvynia) c:c3d5264 -
[http] Only set the content type header if there's a body (@acdenisSK) c:d851fea
-
[framework] Store command names in lowercase when case-insensitivity is on (@acdenisSK) c:8bba7b0
-
[misc] Fix release dates (@bikeshedder) c:f27c7c1
-
[framework/docs] Fill in the missing attribute options (@acdenisSK) c:683ff27
-
[http/docs] Fix link to the
fire
method (@acdenisSK) c:1361b33 -
[framework] Fix strikethrough options refusing to accept
name = value
syntax (@acdenisSK) c:581eb2f -
[framework/docs] Fix a broken link in docs (@Elinvynia) c:48c4b59
-
[misc] Fix a typo in the message builder example (@TitusEntertainment) c:f2d0ad5
-
[framework] Fix
check_in_help
being unaccounted for (@acdenisSK) c:a692bcd -
[http] Support image URLs in
add_file
(@Elinvynia) c:61bcfbc -
[http] Add impls for borrowed
Arc
s toCacheHttp
(@acdenisSK) c:4b67d8e
- [all] Remove usage of deprecated
std::error::Error
functions (@acdenisSK) c:ec306ee
0.8.0 - 2020-01-12
The next major release of Serenity, coupled with improvements, bugfixes and some breaking changes.
To stay consistent with the #[command]
, #[help]
and #[check]
macros,
the function-like group!
procedural macro has also joined in to
the squad of the attribute procedural macros.
Thanks to the following for their contributions:
- @acdenisSK
- @CarlGroth
- @Erk-
- @ikkerens
- @Lakelezz
- @LeSeulArtichaut
- @Mendess2526
- @nickelc
- @TheUnitedStatesOfAmerica
- @zeyla
- [framework] Allow multiple examples in commands (@Mendess2526) c:08d894e
- [gateway] Add support for receiving custom statuses (@Erk-) c:f897a8d
- [http] Rename 'raw' module to 'client' (@zeyla) c:8326dc7
- [http] Rework ratelimit structure (@zeyla) c:5dbe078
- [cache/http] Use
CacheRwLock
inCacheAndHttp
(@Lakelezz) c:28a91c6 - [framework] Apply case-insensitivity on prefixes (@acdenisSK) c:b2c951d
- [framework] Turn off the
owner_privilege
option (@acdenisSK) c:d4b45f4 - [model] Ensure nullable Discord API values are optional in audit log fields (@ikkerens) c:3a3f9b3
- [framework] Turn the function-like group macro to an attribute macro (@acdenisSK) c:5b01290
- [http] Utilise Discord's new precision and reset-after headers (@acdenisSK) c:6916bfc
- [http] Change
AttachmentType
to useCow
s instead (@ikkerens) c:b5deb39 - [framework] Format the list of attribute options with tables (@acdenisSK) c:3c2f9ad
- [framework] Impose thread-safety requirements on the event handlers (@acdenisSK) c:3a449ee
- [framework] Deduplicate Client initialisation code (@acdenisSK) c:e807288 c:ab7f631
- [client/gateway] Add an option to turn off guild subscriptions (@acdenisSK) c:db5a09e
- [framework] Interpret doc-comments as the description attribute (@acdenisSK) c:cc2f918
- [framework] Account for checks in the help command (@acdenisSK) c:240d3e6
- [framework] Add documentation to the
check
macro (@acdenisSK) c:0b3ad00 - [model] Mark the
Event
enum as untagged (serde) (@CarlGroth) c:173f7fa - [model] Add new auditlog type enums (@ikkerens) c:aed4b24
- [framework] Abuse the compiler to do type checking for us (@acdenisSK) c:d6699c2
- [meta] Upgrade to reqwest v0.10.0 (@nickelc) c:69f2dff
- [http] Fix crash due to Bearer token not having the 'email' scope (@LeSeulArtichaut) c:ae0acd0
- [model] Fix
Guild::edit_role_position
example (@LeSeulArtichaut) c:346a7fe - [utils] Fix compilation of the
utils
feature without themodel
feature (@Erk-) c:487fa04
- [framework] Get rid of the
Arc
implementation forFramework
(@acdenisSK) c:05044b6 - [client] Turn the function-like group macro to an attribute macro (@acdenisSK) c:5b01290
- [http] Remove april fools functions (@TheUnitedStatesOfAmerica) c:caeeda1
0.7.8 - 2020-04-26
This release prevents a loop when requesting a restart of a Shard, resulting in the Shard hanging forever.
Thanks to the following for their contributions:
0.7.7 - 2020-04-22
The last bugfix release was ironically broken because of a slight oversight. This release fixes that.
Thanks to the following for their contributions:
0.7.6 - 2020-04-18
This release fixes Serenity's handling of Discord's new rebalances. You should no longer encounter many Ready events.
Thanks to the following for their contributions:
0.7.5 - 2020-01-13
An emergency release to fix build breakage due to violation of SemVer for the command_attr
crate.
0.7.4 - 2019-12-13
Thanks to the following for their contributions:
- [framework] Enable pub restrictions (@acdenisSK) c:e6ed1b5
- [framework] Implement Default for CommandOptions and GroupOptions (@LeSeulArtichaut) c:918273b
- [framework] Fix regression of default option initialisation (@acdenisSK) c:42937e9
0.7.3 - 2019-11-19
Small release including fixes for Discord API changes. Please note with this version the minimum supported version of Rust is 1.37.
Thanks to the following for their contributions:
- [framework] Properly
pub
licise the iterator (@acdenisSK) [c:1924946] - [ci] Try to update repository information beforehand (@acdenisSK) [c:19b590a]
- [audit log] Cover all error cases for audit log deserialization (@ikkerens) [c:beb4d5a] [c:afc04e4]
0.7.2 - 2019-10-21
A tiny release for a fix to voice
Thanks to the following for their contributions:
- [voice] Fix
ClientVoiceManager::remove
to actually callManager::remove
(@MOZGIII) c:2734e27 - [voice] Use the correct ip for the UDP socket (@acdenisSK) c:c4b1c60
0.7.1 - 2019-9-29
It seems Discord has a thing against library developers. They disabled the account of a discord.js developer because they were allegedly "underage" (below 13 years old). There were credit card transactions to defend their innocence, but Discord argued that they need a photo of their face to properly verify their age, a request the developer declined to comply. Consequently, they chose to no longer be on Discord.
Recently, they did the same thing to @Lakelezz, a huge contributor to Serenity. However, this time they did not state their exact reason, simply saying "in violation of the ToS". Just like the JS developer, she decided to stop affiliating herself with the platform, if this is how it presents its "gratitude" towards her. But also, to cease development of the library.
And thus, on her behalf, I, the main lead developer @acdenisSK, announce her retirement of the project.
Thanks to the following for their contributions:
- [model] Add support for the
preferred_locale
field (@Erk-) c:2d3e585 - [meta] Add missing word
need
. (@Lakelezz) c:65837f5 - [model] Add new message fields (@Erk-) c:e762ea9
- [gateway/client] Implement WebSocket shutdown support (@ikkerens) c:711882b
- [utils] Add more formats and case insensitivity to
parse_invite
(@ikkerens) c:0183714 - [model] Add optional inviter field to Invite (@ikkerens) c:21c95fd
- [meta] Set minimum Rust version to
1.37.0
. (@Lakelezz) c:de9e8a6 - [meta] Update related project's hrefs (@kyranet) c:445810f
- [meta] Fix serenity version in the readme (@Zalaxx) c:730c959
- [framework] Fix incorrect label usage in plain help commands (@acdenisSK) c:d427da4
- [model] Fix
has_role
returning an incorrect result if the member is not cached (@ikkerens) c:96b49f9
0.7.0 - 2019-8-29
An emergency release to fix a conflict in our ring
dependency that prevents compilation if you pull in an older and newer version at the same time.
Thanks to the following for their contributions:
0.6.4 - 2019-8-27
Thanks to the following for their contributions:
- [model] Add a method to create and iterable of
Member
s in aGuild
(@Alch-Emi) c:aa1070d - [utils] Add quoting functionality to
MessageBuilder
(@AregevDev) c:720d9ad - [model] Add support for new message types (@Erk-) c:c45c1d4
- [model] Add support for store channel (@Erk-) c:8594c29
- [model] Link to
ShardMessenger::chunk_guilds
inGuild
'smember
field (@Alch-Emi) c:8e926f9 - [framework] Add group-related removal and non-consuming adding functions to
StandardFramework
(@Jerald) c:3a4e2ed - [framework] Allow delimiters to be set on a per command basis (@acdenisSK) c:6f7797e
- [voice] Play a YouTube Search's first video (@Sreyas-Sreelal) c:ccbba0a
- [model] Add methods to get permissions of
Role
s inGuildChannel
s (@Lakelezz) c:09c1e01 - [utils] Allow users to create their own messages (@acdenisSK) c:e8da420
- [model] Fetch the guild id only if necessary (@acdenisSK) c:85dd1a0
- [meta] Move
webpki
andwebpki-roots
to therustls_backend
-feature (@leo-lb) c:2439275
- [model] Fix content of a message if there's an attachment (@Erk-) c:6d06632
- [meta/examples] Fix a typo in the examples (@Sreyas-Sreelal) c:22f3d2a
- [framework] Fix plain help suggestions (@Lakelezz) c:ec687ad
0.6.3 - 2019-7-24
Thanks to the following for their contributions:
- [framework] Update module-level example (@acdenisSK) c:26192fa
- [client/model/utils] Changed some
&str
-parametres toimpl AsRef<str>
(@xacrimon) c:abd84c2 - [framework] Try to always ignore bots and webhooks when configured by the user (@acdenisSK) c:4cf4b21 c:b7b3a85
- [framework] Apply case-insensitivity to help if needed (@acdenisSK) c:cd4ca1b
- [voice] Fix mistake in
voice::Audio
's documentation withplay_only
(@Mendess2526) c:e6c5d41 - [utils] Make
MessageBuilder::push_spoiler_*
consistent with the otherpush_
functions (@hyarsan) c:d2df2b9 - [misc.] Update to the actual minimum Rust version Serenity supports (@acdenisSK) c:d280ed1
- [misc.] Fix comment in the group prefixes example (@NieDzejkob) c:81d5af1:
- [framework] Fix
Reason
's doc-link by usingenum
(@Lakelezz) c:a8f0387 - [client] Fix private channel deletions making serenity panic (@Erk-) c:67f5e3d
- [model] Fix
create_invite
's doc-example (@Lakelezz) c:45d44cb - [framework] Update
help_commands
's module example (@acdenisSK) c:8cdfd7c - [framework] Remove unnecessary ticks (@Lakelezz) c:eddef7b
0.6.2 - 2019-6-30
A small release to address a severe deserialization bug.
Thanks to the following for their contributions:
- [meta] Reduce versioning in examples to major.minor (@Lakelezz) c:13595ff
- [framework/command_attr] Escape tags and add newline in documentation (@Lakelezz) c:b28716c
- [framework/command_attr] Fix invalid documentation for the group macro (@benjaminrsherman) c:17f1dc2
- [model] Fix guild deserialisation regression (@zeyla) c:e628614
0.6.1 - 2019-6-29
Thanks to the following for their contributions:
- [framework/command_attr] Add the option to override the display name of a group (@acdenisSK) c:759a278
- [framework] Add
remains
, an optional alternative torest
(@hyarsan) c:3e15bb8
- [meta] Update the versions to be latest in the README. (@xacrimon) c:335701e
- [model] Change the generic of
members
to encompass theOption
(@zeyla) c:3a72058 - [framework] Remove
set_remove
with hint to the#[check]
(@Lakelezz) c:1527838
- [model] Revert
say
takingself
to&self
(@zeyla) c:e5081db - [framework] Give the owner privilege if only both the group and its command give consent. (@acdenisSK) c:030bb4d
- [command_attr] Fix
command_attr
documentation using#[sub]
instead of#[sub_commands]
(@rsaihe) c:7a0d169
0.6.0 - 2019-6-21
🎉 It has finally come for the biggest release of Serenity yet! 🎉
Thanks to the following for their contributions:
- @AregevDev
- @acdenisSK
- @andreasots
- @Celti
- @DarkKirb
- @Erk-
- @eatsfoobars
- @Flat
- @FelixMcFelix
- @hyarsan
- @icewind1991
- @Kroisse
- @Lakelezz
- @Mishio595
- @molenzwiebel
- @mattico
- @nycex
- @PvdBerg1998
- @Roughsketch
- @xacrimon
- @xSke
- @zeyla
- [framework/command_attr#docs] Add
#[bucket]
to the available attributes list. (@acdenisSK) c:0daaac1
- [examples] Fix a typo of Serenity (@Lakelezz) c:90b7829
- [gateway] Remove tungstenite buffer limits (@molenzwiebel) c:638b642
- [framework/command_attr] Be more helpful when reporting errors on return types (@acdenisSK) c:c8a8d4f
- [model] Make all structs non-exhaustive (@zeyla) c:dddd417
- [http] No longer delay ratelimit sleeps by 500ms (@acdenisSK) c:638bb1a
- [framework/command_attr] Assign the new value to the correct colour (@acdenisSK) c:d1addff
- [model] Fix panic on deserialising
PartialGuild
with no Nitro boosters. (@xSke) c:5e77718
- [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
- [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
- [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
- [builder] Remove unused
build
-method. (@Lakelezz) c:c6ae140 - [client] Remove
quit
method. (@zeyla) c:f7109ee - [utils] Remove
VecMap
. (@acdenisSK) c:9450d4b
- [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
- [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
- [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
- [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
- Fix ActivityFlags/ActivityTimestamps/ActivityParty deserialization (@zeyla) c:0a77330 c:d01eeae
- Fix
MessageBuilder
's doctests (@Flat) c:a3477a2
- [client] Remove deprecated
Context::edit_profile
(@zeyla) c:bc0d82e - [misc.] Remove everything marked
deprecated
sincev0.5.x
or older (@Lakelezz) c:70720ae
0.6.0-rc.2 - 2019-6-14
Thanks to the following for their contributions:
A crucial release fixing a lot of misbehaviour:
- [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
- [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
- [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
- [builder] Remove unused
build
-method. (@Lakelezz) c:c6ae140 - [client] Remove
quit
method. (@zeyla) c:f7109ee - [utils] Remove
VecMap
. (@acdenisSK) c:9450d4b
0.6.0-rc.1 - 2019-5-14
Thanks to the following for their contributions:
A short release for some things we overlooked.
- [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
- [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
0.6.0-rc.0 - 2019-5-6
Thanks to the following for their contributions:
- @acdenisSK
- @andreasots
- @Celti
- @DarkKirb
- @eatsfoobars
- @Erk-
- @FelixMcFelix
- @Flat
- @hyarsan
- @Kroisse
- @Lakelezz
- @Mishio595
- @PvdBerg1998
- @Roughsketch
- @zeyla
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!
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.
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!
- [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
- [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
- Fix ActivityFlags/ActivityTimestamps/ActivityParty deserialization (@zeyla) c:0a77330 c:d01eeae
- Fix
MessageBuilder
's doctests (@Flat) c:a3477a2
- [client] Remove deprecated
Context::edit_profile
(@zeyla) c:bc0d82e - [misc.] Remove everything marked
deprecated
sincev0.5.x
or older (@Lakelezz) c:70720ae
0.5.14 - 2019-5-17
This release fixes a few bugs.
Thanks to the following for their contributions:
- [model] Allow turning on and off the nsfw property of guilds channels (@acdenisSK) c:68c4f5c
- [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
0.5.13 - 2019-3-10
Thanks to the following for their contributions:
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.
- [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
- [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)
- [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
0.5.12 - 2019-2-14
This is a celebratory release for Valentine's day, which we present to you with utmost courtesy.
Thanks to the following for their contributions:
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};
- [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
- [http] Limit users from requesting over 100 users (@Flat) c:8bf39a7
- [client/event-handler] Elaborate causes for
guild_member_removal
(@Lakelezz) c:dd75410
- [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
0.5.11 - 2018-11-12
Mini-release.
Thanks to the following for their contributions:
- [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
- [general] Update the
base64
andsodiumoxide
dependencies (@DoumanAsh) c:5f9ed749 - [general/examples] Turn
unwrap
s toexpect
s and update to nested imports (@Lakelezz) c:d6c4beea
0.5.10 - 2018-11-5
This is a celebration release for the anniversary of the failed Gunpowder Plot enacted against King James of England and Scotland in 1605.
Thanks to the following for their contributions:
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" }
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.
- [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
- [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
- [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
0.5.9 - 2018-09-14
This is a maintenance release fixing a number of bugs with a few miscellaneous internal changes.
Thanks to the following for their contributions:
- [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
- [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
- [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
0.5.8 - 2018-08-12
This is a hotfix release for incorrect routing and to fix a large number of broken documentation links.
Thanks to the following for their contributions:
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.
- [utils] Add
Colour::hex
(@Mishio595) c:8bec4af
- [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
- [framework] Fix doctest for
Args::iter_quoted
(@acdenisSK) c:7b0cff6 - [framework] Remove some code duplication (@Lakelezz) c:516ede3
- [framework] Don't trim command on failure in default command (@Lakelezz) c:46b4194
0.5.7 - 2018-08-09
This is a hotfix release for an incorrect warning about cache deadlocking during event dispatches in the client and fixing some routing method typos due to the HTTP rewrite.
Thanks to the following for their contributions:
- [client] Fix erroneous deadlock detection messages (@Lymia) c:d1266fc
- [http] Fix some routing issues (@zeyla) c:04b410e
- Slightly reword a cache update comment (@acdenisSK) c:3a58090
0.5.6 - 2018-08-07
This is a bugfix release that fixes a long-standing bug causing shards to
randomly die under certain rare conditions when dispatching the Ready event,
and compilation of the cache
and client
features without the framework
feature. This also contains an internal rewrite of the HTTP module.
The minimum required rustc version is now pinned at 1.25.0.
Thanks to the following for their contributions:
Per c:01e3c33, Context::edit_profile
has been deprecated. Call
serenity::http::edit_profile
instead.
- [model]
impl AsRef<MessageId> for Message
(@Mishio595) c:1de3937 - [model] Add
From
impls forGame
, genericifyGame
params (@zeyla) c:e1332a5, c:a4c3fec - [http] Make
http::fire
,http::request
public (@zeyla) c:0d55363 - [framework] Add no-parse getters and advancer to
Args
(@acdenisSK) c:73ab20f - [model] Add support for new
PRIORITY_SPEAKER
permission (@Erk-) c:2179623
- [client] Don't delay Ready event with cache enabled (@zeyla) c:12d5321
- [framework] Handle no delimiters in
Args
(@acdenisSK) c:e5ea6c1, c:9568e3b - [client] Add missing
mut
, fixing no-framework compilation (@acdenisSK) c:90c7ec4 - [framework] Check if message is empty in
Args
(@acdenisSK) c:0501020 - [client] Fix potential cache deadlocking when dispatching (@zeyla) c:f064d65
- [framework] Pass failed sub-command to default command (@Lakelezz) c:db21036
- [framework] Fix default command upon shortcut prefix (@Lakelezz) c:8f128b2
- [model] Fix
ChannelId::send_message
's dead links (@acdenisSK) c:7a93557 - [model] Add note about cache in
UserId::get
docs (@zeyla) c:e2873c8 - [general] Reduce required rustc to 1.25.0 (@zeyla) c:f3f22d7, c:b324774
- [model] Make
GuildId::member
use cache when possible (@Roughsketch) c:21eb42f - [framework] Reword some
StandardFramework::complex_bucket
docs (@acdenisSK) c:02de778 - [framework] Internally refactor
positions
(@acdenisSK) c:2a6c3b1 - [framework] Update
Configuration
default value listings (@zeyla) c:602c5a7 - [http] Maintain a single, re-used HTTP client (@zeyla) c:8c0e5a3
- [http] Redo the HTTP module internally (@zeyla) c:a0b0dd2, c:4648f58, c:8918201, c:8301333, c:bbbf638, c:9a863bd, c:c458099, c:aa437d4
- [docs] Don't return Result from tests (@acdenisSK) c:e290b03
- [docs] Fix all dead links in permissions (@Erk-) c:869fff5
0.5.5 - 2018-07-25
This release is mostly a bugfix release. Thanks to the following for their contributions:
- [framework] Add
Args::rest
(@acdenisSK) c:9b2cd75 - [model] Add
Message::guild_id
structfield (@foxbot, @zeyla) c:a9e8626, c:3121f90 - [framework] Improve logic for displaying help (@Lakelezz) c:7937025
- [http] Add
http::ratelimiting::offset
(@zeyla) c:55555b8 - [cache] Make the Cache Update API public (@zeyla) c:9e56062
- [utils] Add associated consts in
utils::Colour
(@zeyla) c:bbfc8e2 - [model]
impl From<&ID> for ID
for all Id types ([@zelya]) c:9e45642, c:530ea76 - [cache] Add a Message cache API (@zeyla) c:e602630
- [voice] Add
streamer::ffmpeg_optioned
(@zeyla) c:5dab87b, c:1f3a57e - [model] Implement Mentionable for
GuildChannel
(@Mishio595) c:ce8da79 - [framework] Allow nil prefixes in DMs (@acdenisSK) c:10bbffe
- [model] Implement
Mentionable
forChannelCategory
,Group
,PrivateChannel
(@zeyla) c:dd3744b, c:8ce8234, c:d11d916, c:5abc7d1 - [framework] Add checks for groups (@Lakelezz) c:29480e5
- [framework] Support multiple prefixes for command groups (@Lakelezz) c:305d200
- [framework] Add default commands for command groups (@Lakelezz) c:40c8248, c:8aefde0
- [framework] Handle debug impls better (@acdenisSK) c:caeab28, c:7eac4d5
- [framework] Reorder some dispatch checks to fix an owner override bug (@acdenisSK) c:8114a7a, c:93f453b
- [framework] Force
Args::find{,_n}
to be quote-aware (@acdenisSK) c:f0f06b7 - [framework] Fix an
Args
test (@zeyla) c:2ef660e - [framework] Fix command visibility on no help (@Lakelezz) c:aeb89af
- [framework] Add missing
Send + Sync
bounds onCheck
(@acdenisSK) c:f09b661 - [utils] Fix
utils::is_nsfw
slicing (@acdenisSK, @zeyla) c:0067c33, c:ccd2506 - [utils] Fix
nsfw-
case inutils::is_nsfw
(@zeyla) c:bd4aa0a - [framework] Don't assume all characters at end are 1-length (@acdenisSK) c:4e4dcb1
- [framework] Don't suggest command if no command is related to input (@Lakelezz) c:614402f
- [framework] Fix example typo (@perryprog) c:d0d363f
- [framework] Add more docs to
Args
(@acdenisSK) c:04b0be1 - [general] Fix extraneous spaces at the end of lines (@zeyla) c:6ddfef8
- [http] Add (late) april fool's functions (@TheUnitedStatesOfAmerica) c:5ffdcea
- Rename https://github.com/serenity-rs/serenity/commit/6e1edde4a3fe27d0d90db7ea906ca5f115a2d5fb
- [framework] Remove some repitition repition (@acdenisSK) c:10f7548, c:1ec1086
- [docs] Add more docs to
CreateEmbed::fields
(@acdenisSK) c:703d135 - [docs] Remove some dead links (@acdenisSK, @Lakelezz) c:eae624e, c:4cf83d0
- [docs] Remove old notice about
CreateEmbed::field
(@acdenisSK) c:5b66ace - [examples] Add
CreateEmbed::field
andCreateEmbed::fields
usage to example 11 (@drklee3) c:a9a2c27 - [general] Monomorphize all functions (@zeyla) c:7b9764c
- [general] Update README logo URI (@zeyla) c:2ff765b
- [docs] Fix doc links with no anchor (@zeyla) c:0d6e019
- [docs] Add docs for
Args::new
(@acdenisSK) c:b520ec7 - [general] Fix some clippy lints (@zeyla) c:9da7669
0.5.4 - 2018-06-07
Thanks to the following for their contributions:
- [model] Add
Message::member
structfield (@zeyla) c:0e1e8fb - [docs] Document example binding names for EventHandler method signatures (@acdenisSK) c:08a7110
- [model] Implement
Mentionable
forCurrentUser
(@zeyla) c:4a24c90 - [model] Implement
From<CurrentUser> for User
andFrom<&CurrentUser> for User
(@zeyla) c:af7f176 - [framework] Add option for bots to work only in certain channels (@vityafx) c:457a17e
- [framework] Differentiate in help whether a command is unavailable in DMs or guilds (@Lakelezz) c:89a18aa
- [framework] Improve
Args
docs (@acdenisSK) c:2603063 - [model] Add
Message::mentions_user_id
,Message::mentions_user
(@Lakelezz) c:1162e68 - [docs] Update voice example 06 to make joining join the command invoker's voice channel (@drklee3) c:a80aab2
- [framework] Fix a framework example so it makes sense (@acdenisSK) c:63fe032
- [model] Remove deadlocking in
Member::highest_role_info
(@zeyla) c:c659bbd - [framework] Dispatch to a threadpool only if required (@Lakelezz) c:23c5398
- [framework] Fix strikethrough behaviour (@Lakelezz) c:32c3bed
- [general] Fix links to the new repo location (@Lakelezz, @zeyla) c:152fe3d c:0324e01
- [framework] Switch to
str::match_indices
for some Args ops (@acdenisSK) c:cc6b567 - [framework] Remove
if length == 1
branch in Args functions (@acdenisSK) c:6346975 - [framework] Optimize
Args::find
,Args::find_n
(@acdenisSK) c:5ba521b - [framework] Revamp
Args
from the ground up (@acdenisSK) c:ff9edc0
0.5.3 - 2018-05-01
Thanks to the following for their contributions:
- [http] Take
Date
header into account when ratelimiting (@zeyla) c:40db3c0 - [general] Add new join messages (@zeyla) c:36d7a54
- [voice] Send silence frames upon connection (@FelixMcFelix) c:83a0c85
- [general] Remove spurious import warning (@acdenisSK) c:64dcced
- [docs] Fix dead link (@Lakelezz) c:42063a2
- [model] Fix "Guild Member Chunk" deserializations (@zeyla) c:fd77a91
- [voice] Fix voice hang (@FelixMcFelix) c:e546fa2
- [client] Fix panics on some guild member updates in certain situations (@zeyla) c:526c366
- [gateway] Clarify shard sequence-off log (@zeyla) c:7f9c01e
- [client] Log more information about failed deserializations (@zeyla)
- [framework] Reword command macro docs (@acdenisSK) c:a481df6
0.5.2 - 2018-04-14
This release contains the usual bugfixes and helper methods.
Thanks to the following for their contributions:
- @acdenisSK
- @FelixMcFelix
- @ForsakenHarmony
- @jkcclemens
- @Lakelezz
- @megumisonoda
- @Roughsketch
- @Scetch
- @xentec
- @zeyla
- [builder] Generalize
CreateEmbed
method parameters (@acdenisSK) c:f115c17 - [http] Add 'Get Guild Vanity Url' endpoint (@zeyla) c:dbfc06e
- [framework] Add
unrecognized_command
method (@Lakelezz) c:2937792 - [client] Add documentation to
EventHandler
(@acdenisSK) c:80dfcb0 - [http] Support sending files with an embed (@Scetch) c:7e0d908
- [voice] Add
Drop
impl for ffmpeg container (@FelixMcFelix) c:3d67a4e - [model] Pad user discrims in
content_safe
(@megumisonoda) c:2ab714f - [framework] Properly check if
Args
input is empty (@acdenisSK) c:beebff5 - [voice] Backport c:7d162b9 (voice fixes) (@FelixMcFelix) c:9baf167
- [framework] Fix no-cache StandardFramework compilations (@Lakelezz) c:02dc506
- [builder] Make
CreateEmbed
andCreateMessage
consistent (@acdenisSK) c:77c399b - [framework] Fix
help
command precedence (@acdenisSK) c:c6a5fe4 - [gateway] Fix heartbeat checking (@zeyla) c:21fe999
- [framework] Fix
Args::is_empty
behaviour (@acdenisSK) c:e5bcee7 - [framework] Add
Args::full_quotes
(@acdenisSK) c:24d2233 - [http] Do not include Optional params if None for audit logs (@jkcclemens) c:bd195de
- [model] Handle deserializing
AuditLogEntry::target_id
(@acdenisSK) c:0d779ba - [model] Fix
AuditLogOptions
to be correct types (@acdenisSK, @jkcclemens) c:217e1c6, c:2791ed7
- [builder] DRY in
CreateEmbed
builder methods (@xentec, @acdenisSK, @zeyla) c:2e1eb4c c:d8c9d89, c:a4cc582, c:ffc5ea1 - [builder] Inline some CreateEmbed builder methods (@acdenisSK) c:e814e9a
- [framework] Add tests for empty messages (@Lakelezz) c:d0ae9bb
- [general] Remove useless clones (@Roughsketch) c:b71d99f
- [framework] Add
no_run
to doctests that instantiate a Client (@Roughsketch) c:003dc2e - [general] Don't create enums and IDs via macros (@ForsakenHarmony) c:fdcf44e
- [framework] Short-circuit on errors (@acdenisSK) c:82e21a6
- [model, utils] Fix nsfw related docs (@Lakelezz) c:7f09642
- [framework] Improve docs for
Args
(@acdenisSK) c:b9fa745 - [general] Fix some documentatoin typos (@Lakelezz) c:e506e9f
0.5.1 - 2018-01-31
This release contains a number of fixes, a few more model helper methods, and additional framework features.
Thanks to the following for their contributions:
- [framework] Add way to register middleware functions directly on
CreateCommand
(@acdenisSK) c:d193975 - [model] Add
Message::member
(@zeyla) c:ce2952a - [http, model] Add functions to reorder a guild's channels (@zeyla) c:ab1f11a
- [voice] Add multiple audio stream playback, volume control, and pausing (@FelixMcfelix) c:324a288
- [framework] Fix incorrect skipping for some prefixes (@ConcurrentMarxistGC) c:76bcf7d
- [framework] Trim content after prefix mentions (@Lakelezz) c:27c83e8
- [voice] Strip RTP header extensions if present (@indiv0) c:e4612ac
- [voice] Fix voice websocket loop termination (@indiv0) c:55fa37a
- [model] Account for guild owners in member hierarchy check (@zeyla) c:03a7e3e
- [model] Check message ID count in
delete_messages
(@zeyla) c:92c91b8 - [model] Correctly set newly created roles' positions on new roles (@zeyla) c:5a0b8a6
- [voice] Fix an odd-to-use
Into<Option<Box<T>>>
bound (@zeyla) c:eee3168 - [framework] Fix case insensitivity for aliases (@Lakelezz) c:d240074
- [docs] Fix broken docs links caused by model module changes (@zeyla) c:8578d5f
- [general] Reduce number of clones in the library (@zeyla) c:13b0de1
- [example] Add voice receive example (example 10) (@zeyla) c:b9a7e50
- [examples, framework] Add docs for customised help functions (@Lakelezz) c:7912f23
- [example] Add another message embed builder example (@perryprog) c:aba1ba6
0.5.0 - 2018-01-20
This release is a rewrite of the client and gateway internals with a minimal amount of breaking changes for userland code. These changes are mainly to prepare for Tokio and to reduce the number of atomic operations per received event, reducing the number of atomic operations by roughly 85%. The framework has also seen a rewrite, and is now centered around a trait-based design.
Thanks to the following for their contributions:
- @acdenisSK
- @Caemor
- @ConcurrentMarxistGC
- @drklee3
- @fenhl
- @Flat
- @ftriquet
- @hsiW
- @indiv0
- @jhelwig
- @jkcclemens
- @Lakelezz
- @MOZGIII
- @nabijaczleweli
- @Roughsketch
- @tahahawa
- @thelearnerofcode
- @timotree3
- @zeyla
Per c:91c8ec4, the Guild::default_channel
and
Guild::default_channel_guarenteed
methods now return
Option<Arc<Mutex<GuildChannel>>>
instead of Option<GuildChannel>
. This
avoids a clone. To access the channel, you just have to retrieve a read or write
lock by doing guild.default_channel()?.read()
or
guild.default_channel()?.write()
.
Per c:14b9222, there is a new Member::default_channel()
function that
returns the default channel for the user. This no longer returns the channel
with the same ID as the guild itself, as this behaviour was changed by Discord.
A member's "default channel" is now the top-most channel that it has permission
to view. Accordingly, Guild::default_channel
matches this behaviour.
Per c:93e0a42, the library now uses the parking_lot
crate's Mutex
and
RwLock
implementations over the stdlib's. parking_lot
s implementations are
more efficient, do not poison due to lock drops on unwinding, and implement
eventual fairness.
To account for this, change all Mutex
lock retrievals and RwLock
read and
write lock retrievals to not unwrap. parking_lot
's Mutex::lock
,
RwLock::read
, and RwLock::write
don't return Results, unlike the stdlib
's.
Per c:78c6df9, the Guild::features
structfield is no longer a
Vec<Feature>
. Discord adds guild features over time, which can cause guilds
with those new features to fail in deserialization. Instead, we're
future-proofing by making this a Vec<String>
.
Per c:65e3279, the CreateEmbed
builder's field
and fields
functions no
longer take a builder as the argument, and instead take 3 arguments. For
example, code like this:
channel.send_message(|m| m
.embed(|e| e
.title("This is an embed")
.field(|f| f
.name("Test field")
.value("Test value")
.inline(true))));
Would now be this:
channel.send_message(|m| m
.embed(|e| e
.title("This is an embed")
.field("Test field", "Test value", true)))
Per c:ad0dcb3, shards can no longer have their afk
property set, as this was
a leftover from user account support. This removes the afk
parameter of the
Context::set_presence
function, removal of the parameter from the
Shard::set_presence
function, and the Shard::set_afk
function.
Per c:b328b3e, the client::EventHandler
no longer prefixes all trait methods
with on_
. An implementation that looks like this:
use serenity::client::{Context, EventHandler};
use serenity::model::Message;
struct Handler;
impl EventHandler for Handler {
fn on_message(&self, _: Context, msg: Message) {
// ...
}
}
Now looks like this:
use serenity::client::{Context, EventHandler};
use serenity::model::channel::Message;
struct Handler;
impl EventHandler for Handler {
fn message(&self, _: Context, msg: Message) {
// ...
}
}
(a note on the serenity::model::channel::Message
import later.)
Per c:b19b031, Client::new
returns a Result
, as it now creates some
essential information on instantiation instead of deferring it to when a
connection is started. You can probably just unwrap this Result.
Per c:b8efeaf, c:d5a9aa8, and c:65233ad, the client and gateway internals
have been rebuilt to significantly reduce the number of atomic operations
(upwards of ~85%). This means that retrieval of shard information (like the
shard latency to the Discord gateway or the current connection status) are
retrieved via the encompassing ShardManager
located on
the client. This can be inserted into the client's data
structfield if you
need to access that information in event or framework command handlers. See
this example for more information. Additionally,
Context::quit
to shutdown the shard no longer exists; go through the
ShardManager
instead.
Per c:aad4744, the framework's Args::list
function has been renamed to
Args::multiple
for consistency.
Per c:f10b9d7, c:1fd652b, c:0aa55a2, the framework has been reworked to be trait-based; thus as per c:f61816c, c:4e20277, allowed more useful functionality to commands.
Per c:05f6ed4, the client's close handle has been removed, in favour of
doing so through the ShardManager
.
Per c:8c9baa7, the Guild::default_message_notifications
, Guild::mfa_level
,
PartialGuild::default_message_notifications
, and PartialGuild::mfa_level
structfields are now enums to represent a stronger type, instead of u64
s.
Per c:bcd16dd, the model
module has been broken up: instead of a giant root
module full of imports, types have been moved to where they fit. For example,
the Message
, Reaction
, and Channel
structs are now in the model::channel
module. The RichInvite
, Member
, Role
, and MfaLevel
types are now in
model::guild
. Refer to the commit message or the
model
module docs for more information.
Per c:be43836, the http::HttpError
enum's InvalidRequest
variant no longer
gives just the HTTP status code of the response. It now includes the full
Response instance.
Per c:2edba81, the builder
re-export in the utils
module no longer exists
after being there in deprecation for a long time. Please import it like so:
// old
use serenity::utils::builder;
// new
use serenity::builder;
- [framework] Make the framework error's internal String public (@acdenisSK) c:3b9f0f8
- [client, gateway] Improve shard and shard runner logging (@zeyla) c:f0ee805
- [gateway] Have
ConnectionStage
deriveCopy
(@acdenisSK) c:551f166 - [builder, framework, http, model] Replace
Vec<T>
parameter with more genericIntoIterator<Item=T>
(@ftriquet) c:b146501, c:934eb3a - [builder, gateway, model, voice] Make more parameters generic with trait
bounds of
AsRef
(@acdenisSK) c:e0e7617, c:b62dfd4 - [framework, model] Add help command filtering, member prefix searching (@Lakelezz) c:ee207b3
- [model] Add guild member filtering functions (@Lakelezz) c:f26dad8
- [model]
impl BanOptions for &str
(@acdenisSK) c:7c911d5 - [model] Derive
Default
on IDs andCurrentUser
(@acdenisSK) c:0881e18 - [client] Add a threadpool for event dispatches (@zeyla) c:1fa83f7, c:3e14067, c:f2c21ef
- [model] Fall back to
str::parse
ifparse_username
fails (@acdenisSK) c:8c85664 - [model] Add a parsing fallback for
RoleId
(@acdenisSK) c:5d4301b - [http, model] Expand Audit Log support (@acdenisSK) [c:f491809]
- [framework] Make
Command::aliases
public (@acdenisSK) c:8c83866 - [model]
impl FromStr for ReactionType
(@acdenisSK) c:2032a40, c:84706f1 - [builder] Make trait bounds more generic, from
Into<String>
toDisplay
(@acdenisSK) [c:05dad71] - [framework, internal, model, utils] Derive
Debug
on more public types (@thelearnerofcode) c:e5a6f3a - [model] Change
PrivateChannel::say
to accept a more generic argument (@fenhl) c:a359f77 - [model]
impl From<EmojiId, EmojiIdentifier> for ReactionType
(@fenhl) c:68156c9 - [http]
impl From<&Path> for AttachmentType
(@zeyla) c:7a5aa3c - [model] Add
GameType::Listening
(@hsiW, @zeyla) c:40c5c12, c:a17fea7 - [framework] Add
cmd
function toCreateCommand
andCreateGroup
(@acdenisSK) c:e748d1f - [model] Add
Reaction::message
function (@Roughsketch) c:fd19446 - [model] Add
Reaction::channel
function (@zeyla) c:e02a842 - [model] Add
Reaction::user
function (@zeyla) c:82b87f1 - [model] Implement
Deserialize
for{,Gateway,Voice}Event
(@zeyla) c:c3aa63f - [framework] Add
help()
toCreateGroup
(@Lakelezz) c:39a1435 - [framework] Add a way to execute code when a command is registered (@acdenisSK) c:f61816c
- [framework] Add
before
/after
middleware toCommand
(@acdenisSK) c:4e20277 - [general] Switch from
try_opt!
macro to using?
operator (@hsiW) c:2d23d8b - [framework] Make help commands customizable (@Lakelezz) c:031fc92
- [model] Add
VIEW_AUDIT_LOG
permission (@Lakelezz) c:612e973 - [model] Fallback to
str::parse
onChannelId
FromStr
impl (@acdenisSK) c:0525ede - [model] Add missing fields to
Guild
(@zeyla) c:3d24033, c:99d17d2, c:2abeea5 - [framework] Add
Args::len
(@acdenisSK) c:2c9b682, c:b60d037, c:143fddd - [model] Add variant adapters to
Channel
(@timotree3) c:f0a56f4 - [model] Add
animated
field toEmoji
andReactionType
(@zeyla) c:f2fa349 - [framework] Better support for multiple delimiters on
Args
(@Lakelezz) c:62647f5 - [model] Update
Region
to include new voice regions (@Flat) c:d264cc3 - [framework] Add
Args::iter_quoted
(@acdenisSK) c:032c5a7 - [model] Add missing
num
implementations on models (@zeyla) c:0b1f684 - [client] Add an event for shard connection changes (@zeyla) c:7e46d8f
- [model] Implement or derive
serde::Serialize
on all models (@zeyla) c:25dddb6 - [model] Further generic-ify
reaction_users
'after
parameter (@zeyla) c:85d7d5f - [model] Add
Member::highest_role
(@zeyla) c:b7542f4 - [model] Add
Guild::greater_member_hierarchy
(@zeyla) c:84ff27b - [model] Allow channels to be moved in and out of a category (@jkcclemens) [c:6587655]
- [cache, model] Create partial member instances for users without a Member instance (@zeyla) c:d1113c0
- [gateway] Improve shard reconnection logic (@zeyla) c:45c1f27
- [gateway] Reset shard heartbeat state on resume (@zeyla) c:ae50886
- [http] Make
webhook_id
a majour parameter in ratelimiting (@zeyla) c:1735e57 - [gateway] Resume on resumable session invalidations (@zeyla) c:eb9e8df
- [client] Fix setting of framework (@zeyla) c:12317b9
- [framework] Fix help commands to list all eligible commands in DMs (@Lakelezz) c:114e43a
- [framework] Fix command parsing behaviour when prefix has spaces (@ConcurrentMarxistGC) c:10c56a9
- [client] Attempt to restart failed shard boots (@zeyla) c:8d68503
- [client, gateway] Fix shards attempting to re-identify on their own (@zeyla) c:e678883
- [framework] Fix multiple char delimiters (@zeyla) c:08febb0
- [framework] Fix
multiple_quoted
(@Lakelezz) c:9aad1aa - [model] Fix
#
finding inGuild::member_named
(@tahahawa) c:a7b67df - [builder] Convert embed footers for
impl Form<Embed> for CreateEmbed
(@drklee3) c:9aaa555 - [framework] Fix plain help command (@Lakelezz) c:4bd223a
- [model] Correctly iterate over channel permission overwrites in permission building (@zeyla) c:7566f32
- [model] Compare instants in
Shard::latency
, avoiding panics (@zeyla) c:08db9fa - [model] Add some role hierarchy position checks (@zeyla) c:222382c
- [framework] Add missing
correct roles
checks in help commands (@Lakelezz) c:470f366 - [framework] Fix multibyte character-based prefixes (@ConcurrentMarxistGC) c:e611776
- [framework] Change the way users' command handlers are stored (@acdenisSK) c:d90b90c
- [model]
Guild::{default_channel, default_channel_guarenteed}
now return anArc<Mutex<GuildChannel>>
instead of a clone of the channel (@acdenisSK) c:91c8ec4 - [framework] Don't default command argument delimiter to
" "
(@jhelwig) c:3a4cb18 - [model] Change behaviour of
default_channel
to match Discord's new behaviour (@hsiW) c:14b9222 - [utils] Disallow Message Builder
I
from being user-implemented (@acdenisSK) c:7cf1e52 - [general] Switch to
parking_lot::{Mutex, RwLock}
(@zeyla) c:93e0a42 - [model] Make
{Guild, PartialGuild}::features
aVec<String>
(@zeyla) c:78c6df9 - [builder] Slightly change performance of builders by using
&'static str
s and aVecMap
(@acdenisSK, @zeyla) c:9908999, c:3a0c890, c:26fe139 - [builder] Change
CreateEmbed::field{,s}
to not take builders (@zeyla) c:65e3279 - [client, gateway] Remove setting of a shard's
afk
field (@zeyla) c:ad0dcb3 - [client] Remove
on_
prefix toEventHandler
tymethods (@zeyla) c:b328b3e - [client] Make the Client return a result c:b19b031
- [client, gateway] Redo client+gateway internals to reduce atomic operations (@zeyla) c:b8efeaf, c:d5a9aa8, c:65233ad
- [framework] Rename
Args::list
->Args::multiple
(@acdenisSK) c:aad4744 - [framework] Make framework use trait-based commands (@acdenisSK) c:f10b9d7, c:1fd652b, c:0aa55a2
- [client] Remove client close handle (@zeyla) c:05f6ed4
- [model] Change types of some
Guild
andPartialGuild
structfields (@zeyla) c:8c9baa7 - [model] Break up the model module (@zeyla) c:bcd16dd
- [http] Give the full hyper Response in HTTP errors (@zeyla) c:be43836
- [utils] Remove
builder
module re-export (@zeyla) c:2edba81 - [framework] Remove
is_bot
state boolean (@zeyla) c:524b8f8 - [client, framework, gateway, voice] Use an encompassing
InterMessage
enum to communicate over the gateway (@zeyla) c:9232b8f
- [general] Simplify
Error
'sDisplay
impl (@zeyla) c:ee2bbca - [framework] Document that application owners bypass checks (@fenhl) c:b215457
- [general] Compile all features for docs.rs (@zeyla) c:a96be90
- [model] Document that
Reaction::{message, users}
methods hit the API (@zeyla) c:141bbfc - [builder] Use
ToString
blanket impl forDisplay
s (@acdenisSK) c:3ca7e15 - [framework] Avoid an unwrap in
Args::parse_quotes
(@zeyla) c:60613ef - [client] Trim token given in
Client::new
(@zeyla) c:25d79ac - [model] Fix a doc typo on
User
(@Lakelezz) c:9da642a - [model] Fix docs for
User::has_role
(@zeyla) c:b52eb9f
0.4.5 - 2017-12-09
This release contains a hotfix for the hotfix release, as well as a slight
behaviour change to the EditRole
builder.
The last release contained a deserialization implementation fix which seemed to work after running tests, but it turns out that not all deserialization issues were fixed.
The EditRole
builder's Default implementation no longer sets a value for each
field, as this causes problems with stateless editing of roles.
- [model] Fix remaining deserializers c:52403a5
- [builder] Remove
EditRole::default
implementation c:795eaa1
0.4.4 - 2017-12-09
This release contains a hotfix for snowflake deserialization on serde_json
v1.0.8. Primary development is continuing on the v0.5.x branch and the
library organization.
- [model] Fix snowflake deserializer c:77f462e
0.4.3 - 2017-11-01
This release contains bugfixes and marks the final release of the v0.4.x branch. Future development will continue on the v0.5.x branch.
Thanks to the following for their contributions:
- [model] Add some docs to
BanOptions
(@acdenisSK) c:c99091d - [model] Have
Guild::has_perms
useGuild::member_permissions
(@zeyla) c:1b7101f - [http] Slightly clarify ratelimiting documentation (@zeyla) c:3be6e2e
- [docs] Fix ping bot example (@ThatsNoMoon) c:800e58f
- [docs] Use consistent token names in examples (@zeyla) c:e219a6a
0.4.2 - 2017-10-29
This release contains the regular bugfixes, new features and slight behaviour changes.
Thanks to the following people for their contributions:
- [general] Add a way to change a role's position (@Flat) c:f47a0c8
- [general] Add logging and dotenv to example 07 (@zeyla) c:d50b129
- [general] Add owner + quit function to example 07 (@zeyla) c:41f26b3
- [framework] Add
PartialEq
impls and doc-tests toArgs
(@acdenisSK) c:f9e5e76 - [framework] Add "zero-copy" parsing to
Args
(@acdenisSK) c:9428787 - [framework] Add a debug impl to
DispatchError
(@acdenisSK) c:a58de97
- [general] Fix clippy warnings (@hsiW) c:fbd6258
- [model] Fall back to
str::parse
ifutils::parse_username
fails (@acdenisSK) c:292ceda - [model] Fix
User::has_role
(@zeyla) c:d3015a0ff - [gateway] Fix shard connection (@zeyla) c:585ac6e
- [gateway] Fix shard shutdown via
Context
(@zeyla) c:3616585 - [framework] Fix
allow_whitespace
(@ConcurrentMarxistGC) c:e694766 - [framework, gateway, cache] Properly update emojis in the cache, fix shard re-tries and do some cleanup to
help_commands.rs
(@Lakelezz) c:e02d5fb
- [model] Do equality and hashing on just the user's id (@acdenisSK) c:b7cdf15
- [model] defer to
delete_message
if there's just one message to delete (@acdenisSK) c:c7aa27d - [model] Use the underlaying integer value of
ChannelType
(@acdenisSK) c:e57b510
- [general] Update dependencies (@zeyla) c:2219bb3
- [general] Re-export parking_lot's
Mutex
andRwLock
from the prelude (@zeyla) c:74ec713 - [general] Update the version in
Cargo.toml
to actually bev0.4.2
(@Caemor) c:5829c67 - [general] Cleanup gitignore to have comments (@hsiW) c:ce4f8c2
- [gateway] Use update syntax for
Shard
(@efyang) c:fcc4e2c - [model] Deprecate some methods on
Channel
(@zeyla) c:23ff6f
0.4.1 - 2017-10-14
This release contains bugfixes and some newly added or newly exposed functionality.
Thanks to the following for their contributions this release:
- [general] Replace Vec parameters by
IntoIterator
(@ftriquet)c:55167c3 - [general] Replace slice parameters by
IntoIterator
(@ftriquet) c:022e35d - [model] Add
Guild::members_starting_with
(@Lakelezz) c:b3aa441 - [model] Add
Guild::members_containing
(@Lakelezz) c:1b167b5 - [model]
impl<'a> BanOptions for &'a str
(@acdenisSK) c:cf40386 - [model] Derive
Default
onCurrentUser
and IDs (@acdenisSK) c:09a8a44 - [client] Add a configurable, shard-shared threadpool (@zeyla) c:d7621aa, c:8109619
- [model] Add
Guild::members_username_containing, members_nick_containing
(@Lakelezz) c:002ce3a - [framework] Add an iterator for
Args
(@acdenisSK) c:0ed1972 - [framework] Make
has_all_requirements
public (@Lakelezz) c:08d390c - [framework] Make default help messages list help for aliases (@Lakelezz) c:0d1c0f1
- [model] Use
request_client!
for attachment downloading (@lolzballs) c:71f709d - [client] Fix client no-framework compilation (@zeyla) c:1d4ecb2
- [client] Fix client shards not filling (@zeyla) c:86d8bdd
- [model] Fix
User::tag
andCurrentUser::tag
discrim output (@zeyla) c:6b9dcf5 - [framework] Modify
initialized
method purpose (@acdenisSK) c:05f158f - [framework] Make command Error string public (@acdenisSK) c:917dd30
- [client, gateway] Improve shard logic (@acdenisSK, @zeyla) c:683691f, c:7befcd5
- [gateway] Reset shard heartbeat state on resume (@zeyla) c:c98cae4
- [general] Fix font-height and soften the logo (@Lakelezz) c:3b2c246
- [client, gateway] Improve shard and shard runner logging (@zeyla) c:21e194b
to_owned
->to_string
(@acdenisSK) c:1bf4d9c- [general] Fix most clippy warnings (@Roughsketch) c:7945094
- [framework] Add some docs to
Args
(@acdenisSK) c:8572943 - [examples] Add
env_logger
bot example c:0df77b9 - [general] Fix clippy lints (@zeyla) c:483b069
- [model] Optimize
Member::roles
(@hsiW) c:8565fa2 - [general] Internally use a
try_opt!
macro (@hsiW) c:9b0c053 - [general] Feature-flag extern crates behind their name (@zeyla) c:11b85ca
0.4.0 - 2017-09-25
This release contains a lot of added functionality, minor-scale rewrites, bugfixes, documentation work, and the beginning of a rewrite to use the tokio ecosystem.
The release was delayed due to a fairly majour bug in rust-websocket that we have forked over to temporarily fix.
This release was lead in development by @acdenisSK.
Thanks to the following for their contributions this release:
- @acdenisSK
- @Arcterus
- @Bond-009
- @blaenk
- @hsiW
- @imnotbad
- @joek13
- @Lakelezz
- @Roughsketch
- @xentec
- @zeyla
Per commits c:af1061b, c:cdedf36, and c:aa307b1, Direct Messaging other bot users is now disallowed by the API. To fix this, simply don't do it.
Per commit c:ebc4e51, deprecated functions were finally removed. The following can simply have their usage renamed:
Cache::get_channel
-->Cache::channel
Cache::get_guild
-->Cache::guild
Cache::get_guild_channel
-->Cache::guild_channel
Cache::get_member
-->Cache::member
Cache::get_private_channel
-->Cache::private_channel
Cache::get_role
-->Cache::role
Cache::get_user
-->Cache::user
ChannelId::get_invites
-->ChannelId::invites
ChannelId::get_message
-->ChannelId::message
ChannelId::get_messages
-->ChannelId::messages
ChannelId::get_reaction_users
-->ChannelId::get_reaction_users
ChannelId::get_webhooks
-->ChannelId::webhooks
Channel::get_message
-->Channel::message
Channel::get_messages
-->Channel::messages
Channel::get_reaction_users
-->Channel::reaction_users
Client::login_bot
-->Client::new
Client::login
-->Client::new
Colour::get_b
-->Colour::b
Colour::get_g
-->Colour::g
Colour::get_r
-->Colour::r
Colour::get_tuple
-->Colour::tuple
CurrentUser::distinct
-->CurrentUser::tag
Group::get_message
-->Group::message
Group::get_messages
-->Group::messages
Group::get_reaction_users
-->Group::reaction_users
Guild::get_bans
-->Guild::bans
Guild::get_channels
-->Guild::channels
Guild::get_emoji
-->Guild::emoji
Guild::get_emojis
-->Guild::emojis
Guild::get_integrations
-->Guild::integrations
Guild::get_invites
-->Guild::invites
Guild::get_member
-->Guild::member
Guild::get_members
-->Guild::members
Guild::get_member_named
-->Guild::member_named
Guild::get_prune_count
-->Guild::prune_count
Guild::get_webhooks
-->Guild::webhooks
GuildId::get_bans
-->GuildId::bans
GuildId::get_channels
-->GuildId::channels
GuildId::get_emoji
-->GuildId::emoji
GuildId::get_emojis
-->GuildId::emojis
GuildId::get_integrations
-->GuildId::integrations
GuildId::get_invites
-->GuildId::invites
GuildId::get_member
-->GuildId::member
GuildId::get_members
-->GuildId::members
GuildId::get_prune_count
-->GuildId::prune_count
GuildId::get_webhooks
-->GuildId::webhooks
Message::get_reaction_users
-->Message::reaction_users
PartialGuild::get_bans
-->PartialGuild::bans
PartialGuild::get_channels
-->PartialGuild::channels
PartialGuild::get_emoji
-->PartialGuild::emoji
PartialGuild::get_emojis
-->PartialGuild::emojis
PartialGuild::get_integrations
-->PartialGuild::integrations
PartialGuild::get_invites
-->PartialGuild::invites
PartialGuild::get_member
-->PartialGuild::member
PartialGuild::get_members
-->PartialGuild::members
PartialGuild::get_prune_count
-->PartialGuild::prune_count
PartialGuild::get_webhooks
-->PartialGuild::webhooks
PrivateChannel::get_message
-->PrivateChannel::message
PrivateChannel::get_messages
-->PrivateChannel::messages
PrivateChannel::get_reaction_users
-->PrivateChannel::reaction_users
Role::edit_role
-->Role::edit
User::distinct
-->User::tag
http::send_file
has been replaced by http::send_files
. Instead of using http::send_file
like so:
use serde_json::Map;
use serenity::http;
use serenity::model::ChannelId;
use std::fs::File;
let channel_id = ChannelId(253635665344987136);
let filename = "mr-sakamoto.png";
let file = File::open(&format!("./img/{}", filename))?;
let map = Map::<String, Value>::new();
http::send_file(channel_id, file, filename, map)?;
Instead send an attachment of files, such as:
use serde_json::Map;
use serenity::http;
use serenity::model::ChannelId;
use std::fs::File;
let channel_id = ChannelId(253635665344987136);
let files = vec![
(File::open(&format!("./img/{}", filename))?, filename),
];
let map = Map::<String, Value>::new();
http::send_files(channel_id, files, map)?;
Similar logic can be applied to shortcut methods which have been removed, namely:
Channel::send_file
(instead useChannel::send_files
)ChannelId::send_file
(instead useChannelId::send_files
)Group::send_file
(instead useGroup::send_files
)GuildChannel::send_file
(instead useGuildChannel::send_files
)PrivateChannel::send_file
(instead usePrivateChannel::send_files
)
Instead of using the now-removed Channel::delete_messages
and
Channel::delete_permission
, use the inner channel's method:
use serenity::model::{Channel, ChannelId};
let channel = ChannelId(253635665344987136).get()?;
let message_ids = vec![
MessageId(359845483356749825),
MessageId(359854838403694592),
];
if let Channel::Guild(c) = channel {
c.delete_messages(&message_ids)?;
}
Similar logic can be applied to Channel::delete_permission
.
Member::find_guild
ended up being only a shortcut to the Member::guild_id
structfield. Instead of calling the find_guild
method like
member.find_guild()
, instead access the structfield directly via
member.guild_id
.
The model::permissions::{general, text, voice}
methods have been removed, as
they ended up being shortcuts to the model::permissions::PRESET_GENERAL
,
model::permissions::PRESET_TEXT
, and model::permissions::PRESET_VOICE
constants, respectively.
Per commit c:ea432af, event handling is now done via implementing a trait. Instead of passing functions to the client directly like:
use serenity::Client;
use std::env;
let mut client = Client::new(env::var("DISCORD_TOKEN")?);
client.on_message(|ctx, msg| {
// code
});
Instead implement the new EventHandler trait:
use serenity::client::{Client, Context, EventHandler};
use serenity::model::Message;
struct Handler;
impl EventHandler for Handler {
fn on_message(&self, ctx: Context, msg: Message) {
// code
}
}
let client = Client::new(env::var("DISCORD_TOKEN")?);
Per commit c:4f2e47f, the deprecated ext
module (which has recently only
been a series of re-exports for the cache
, framework
, and voice
modules)
was removed. Instead of using serenity::ext::cache
for example, use
serenity::cache
.
Per commit c:878684f, due to the concept of default channels being changed,
GuildId::as_channel_id
has been deprecated due to the fact that the ID of the
default channel of a guild will no longer necessarily be the same as the guild's
ID.
If you require this same exact functionality (the GuildId
as a ChannelId
),
rewrite your code from:
use serenity::model::GuildId;
let channel_id = GuildId(81384788765712384).as_channel_id();
to:
use serenity::model::{ChannelId, GuildId};
let guild_id = GuildId(81384788765712384);
let channel_id = ChannelId(guild_id.0);
Per commits c:2b053ea, c:8cc2300, c:8e29694, and c:948b27c, custom frameworks can now be implemented, meaning that a built implementation is now passed instead of a base framework being provided and mutated. To use the old framework, modify code from:
use serenity::Client;
use std::env;
let mut client = Client::new(&env::var("DISCORD_TOKEN")?);
client.with_framework(|f| f
// method calls to mutate framework here
);
to the new style:
use serenity::client::{Client, EventHandler};
use serenity::framework::standard::StandardFramework;
use std::env;
struct Handler;
impl EventHandler for Handler { }
let mut client = Client::new(&env::var("DISCORD_TOKEN")?, Handler);
client.with_framework(StandardFramework::new()
// method calls here to mutate framework here
);
Per commit [c:fc9eba3d], if you were pattern matching on the
serenity::framework::DispatchError::CheckFailed
variant, instead either use or
ignore the matched data by rewriting code from:
use serenity::framework::DispatchError;
// Code to begin dispatch error handling here.
match dispatch_error {
DispatchError::CheckFailed => {
// Handle operation here.
},
// Other variants.
}
to:
// The standard implementation is now in a "standard" framework module, but
// that's unrelated.
use serenity::framework::standard::DispatchError;
match dispatch_error {
DispatchError::CheckFailed(_) => {
// Handle operation here.
},
// Other variants.
}
Per commits c:45d72ef, c:03b6d78, and c:d35d719, the framework's
command!
macro no longer parses arguments' types for you. You are now given an
Args
struct that you can retrieve arguments from and parse from to a requested
type that implements FromStr
.
For example, a simple sum function that looked like:
#[macro_use] extern crate serenity;
command!(sum(_ctx, msg, _args, x: i64, y: i64) {
let _ = msg.reply(&format!("Result: {}", x + y));
});
Now looks like:
use serenity::client::Context;
use serenity::framework::standard::Args;
use serenity::model::Message;
fn sum(_: &mut Context, msg: &Message, args: Args) -> Result<(), String> {
let x = match args.single::<i64>() {
Ok(x) => x,
Err(_) => return Ok(()),
};
let y = match args.single::<i64>() {
Ok(y) => y,
Err(_) => return Ok(()),
};
let _ = msg.reply(&format!("Result: {}", x + y));
}
Per commit c:562ce49, serenity::model::User
's FromStr
implementation can
now hit the REST API. No code changes required, but do note the possibility.
Per commit c:40031d9, the following routes have been removed for being userbot routes, which are leftovers from when serenity supported them and had them removed:
http::get_application_info
http::get_applications
http::get_emoji
http::get_emojis
model::Guild::emoji
model::Guild::emojis
model::GuildId::emoji
model::GuildId::emojis
model::PartialGuild::emoji
model::PartialGuild::emojis
Per commit c:092f288, bitflags has been upgraded, which introduces a minor change in how to use permissions.
Update code from:
use serenity::model::permissions::{ADD_REACTIONS, MANAGE_MESSAGES};
foo(vec![ADD_REACTIONS, MANAGE_MESSAGES]);
to:
use serenity::model::Permissions;
foo(vec![Permissions::ADD_REACTIONS, Permissions::MANAGE_MESSAGES]);
- [framework] Make
CommandOrAlias
andCommandGroup.commands
public (@joek13) c:3db42c9 - [builder] Add support for sending attachments in embeds (@acdenisSK) c:c68d4d5
- [client] Add an
on_cached
event (@acdenisSK) c:6d6063f - [framework] Add reaction actions
- [client] Add shard shutdown shortcut to the context (@acdenisSK) c:561b0e3
- [client] Add
is_new
paramenter to theguild_create
handler (@acdenisSK) c:3017f6d - [http, model] Add ban reasons (@acdenisSK) c:420f9bd, c:8a33329, c:710fa02, c:421c709
- [model] Add
Guild::members_with_status
(@acdenisSK) [c:a7a0945], c:29ee627 - [model] Make
Ban
andUser
implEq
,Hash
, andPartialEq
(@acdenisSK) c:64bfc54 - [model] Return error if user exceeds reason limit (@acdenisSK) c:60c33db, c:25d4931
- [builder] Add method to add multiple embed fields (@acdenisSK) c:dbd6727
- [model] Make
BanOptions
take and return an&str
(@acdenisSK) c:1ab8b31 - [framework] Provide the command to checks (@acdenisSK) c:eb47559
- [model] Add
{ChannelId, GuildChannel, PrivateChannel}::name
functions (@acdenisSK) c:ca0f113 - [client] Switch to tokio for events (@Arcterus) c:88765d0
- [client] Add method to close all shards explicitly (@acdenisSK) c:4d4e9dc, c:c2cf691, c:c7b8ab8, c:9900b20, c:d8027d7, c:051d23d
- [framework] Implement adding checks to buckets (@acdenisSK) c:dc3a4df
- [client] Handle the closing of shards (@blaenk) c:5fd3509
- [client] Make
CloseHandle
deriveCopy
(@blaenk) c:b249c82 - [model] Add
nsfw
property to channels (@acdenisSK, @Bond-009) c:b602805, c:fd89d09, c:fd47b86 - [http, model] Add audit log support (@acdenisSK) c:6a101c4, c:4532e4a, c:9ccf388, c:1fad3dd, c:e2053dd
- [model] Add
Message::is_own
(@acdenisSK, @zeyla) c:5a96724, c:fdbfbe0, c:6572580 - [utils] Implement
From<(u8, u8, u8)> for Colour
(@acdenisSK) c:6f147e1 - [builder, model] Make some functions accept a
Display
bound instead of&str
(@acdenisSK) c:7e913b6, c:05162aa, c:0810ab7 - [model] Add simulated default channel methods (@acdenisSK) c:878684f
- [framework] Add support for custom delimiters (@acdenisSK) c:125c1b8, c:fdfb184
- [framework] Provide Args to checks (@acdenisSK, @Roughsketch) c:005437f, c:68c5be8, c:26919cf, c:25e91da, c:ab67c1d, c:caf69d6
- [model] Use cache when possible in
UserId::get
(@Roughsketch) c:bfdb57c - [utils] Add
with_config{,_mut}
(@acdenisSK) c:1a08904 - [voice] Add ability to play DCA and Opus (@Roughsketch) c:3e0b103, c:e1a8fe3
- [model] Add `{Guild,PartialGuild}::role_by_name (@Lakelezz) c:f6fcf32
- [framework] Add
CreateCommand::num_args
(@Roughsketch) c:aace5fd - [framework] Add case insensitive command name support (@acdenisSK) c:deee38d
- [framework] Allow commands to be limited to roles (@Lakelezz) c:d925f92
- [client] Add a way for users to get shards (@zeyla) c:619a91d
- [cache, client, model] Add channel category support (@acdenisSK, @zeyla) c:4be6b9d, c:870a2a5, c:192ac8a, c:485ad29, c:52b8e29
- [client] Add
Context::handle
(@acdenisSK) c:97e84fe - [framework] Copy some functionality from Command to Group (@Roughsketch) c:8e1435f
- [client] Return websocket pings with a pong (@acdenisSK) c:824f8cb, c:e218ce0, c:e72e25c, c:bd05bda
- [utils] Fix
MessageBuilder::push_mono_safe
- [framework] Fix args when
use_quotes
is active (@acdenisSK) c:e7a5ba3 - [model] Make
Reaction::name
optional (@acdenisSK) c:8f37f78 - [gateway] Fix presence updates due to API change (@Roughsketch) c:16a5828
- [model] Fix
permissions::PRESET_GENERAL
bits (@zeyla) c:9f02720 - [http] Update deprecated bulk delete endpoint (@zeyla) c:dbcb351
- [client] Fix subtraction overflow on guild cached dispatch (@Roughsketch) c:f830f31
- [framework] Fix admin permission check (@Lakelezz) c:2fb12e2
- [general] Fix compiles of a variety of feature combinations (@zeyla) c:8e3b4d6
- [client] Fix spawning of multiple events (non-v0.3 bug) (@zeyla) c:7c4b052
- [framework] Add Send/Sync to framework items (non-v0.3 bug) (@zeyla) c:50d7f00
- [model] Prevent Direct Messaging other bot users (@zeyla) c:af1061b, c:266411c
- [cache, client] Apply API changes for bot DMs (@acdenisSK) c:cdedf36, c:aa307b1
- [client] Switch to a trait-based event handler (@acdenisSK) c:ea432af
- [cache, client, http, model, utils] Remove deprecated functions (@acdenisSK) c:ebc4e51
- [framework] Allow custom framework implementations (@acdenisSK, @zeyla) c:2b053ea, c:8cc2300, c:8e29694, c:948b27c
- [general] Remove the BC-purposed
ext
module (@acdenisSK) c:4f2e47f - [model] Deprecate
GuildId::as_channel_id
(@acdenisSK) c:878684f - [utils] Remove
I
bound for MessageBuilder language params (@acdenisSK) c:f16af97 - [cache] Split event handling to a trait (@acdenisSK) c:eee857a, c:32de2cb, c:bc3491c
- [framework] Provide command to
DispatchError::CheckFailed
(@Lakelezz) c:fc9eba3 - [framework] Provide arguments as an iterable struct (@acdenisSK, @Roughsketch) c:106a4d5, c:428cbb9, c:45d72ef, c:03b6d78, c:d35d719
- [model] Provide useful user/role/channel id
FromStr
parsing errors (@acdenisSK) c:8bf77fa, c:8d51ead - [model] Allow
User
'sFromStr
impl to hit REST (@Roughsketch) c:562ce49 - [http] Remove remaining userbot endpoints (@zeyla) c:40031d9
- [general] Update bitflags, other dependencies (@zeyla) c:092f288
- [model] Fix a
ModelError
doctest (@zeyla) c:bd9fcf7 - [docs] Various docs fixes (@hsiW) c:f05efce
- [docs] Update links to docs (@zeyla) c:78e7b1b
- [general] Fix clippy warnings (@imnotbad) c:e1912c2
- [docs] Update to add
EventHandler
(@acdenisSK) c:fdfd5bc - [examples] Update examples (@acdenisSK, @Roughsketch) c:3582691, c:4e360cf
- [docs] Fix doctests from
EventHandler
changes (@acdenisSK) c:511ec87 - [docs] Update readme to use correct docs link (@acdenisSK) c:0240717
- [client] Add a macro for reaction dispatching (@acdenisSK) c:4efe1d1
- [framework] Simplify an iterator usage (@acdenisSK) c:fbc1ac7
- [general] Fix clippy warnings (@imnotbad) c:b6af867
- [docs] Fix the doc on
PrivateChannel::name
(@acdenisSK) c:14fd41b - [model, voice] Use stabilized loop-with-break-value (@acdenisSK) c:f5a97d4
- [model] Change a
match
to anand_then
(@acdenisSK) c:5e5f161 - [framework] Make bucket checks less cache dependent (@acdenisSK) c:ea1eba8
- [framework] Remove unnecessary
Send + Sync
bounds (@acdenisSK) c:3c2716b - [client, framework, http, utils] Remove some clones (@acdenisSK) c:0d6965f
- [cache] Remove an unnecessary map (@acdenisSK) c:924c447
- [general] Make Travis test on osx (@Arcterus) c:fb2a1a9
- [cache] Ignore private channels on create if already cached (@acdenisSK, @Lakelezz) c:7e8da0c, c:e5889ed, c:069df4f
- [examples] Document example 05 more heavily (@Lakelezz) c:0186754
- [examples] Fix listed feature requirements in examples (@zeyla) c:078947e
- [http] Document and un-hide
http::set_token
(@zeyla) c:cb18d42 - [model] Refactor Display impl for Ids (@acdenisSK) c:47ea8f7
- [client] Add a sharding manager base (@zeyla) c:6c43fed
0.3.0 - 2017-06-24
This release contains a number of added methods, fixes, deprecations, and
documentation improvements. It brings a module restructure and an upgrade to
rust-websocket v0.20, hyper v0.10, and switching to native-tls
, meaning
using an up-to-date rust-openssl v0.9 on Linux, schannel on Windows, and
Secure Transport on Mac. The long-standing issue #56 was closed.
Thanks to the following for their contributions this release:
Invite retrieval functions now accept a stats
argument. If you don't need
stats, just pass false
.
ChannelId::create_permission
and GuildChannel::create_permission
now accept
a reference, as they do not need to own the overwrite.
The deprecated GuildChannel
methods (get_invites
, get_message
,
get_messages
, get_reaction_users
, get_webhooks
) have been removed. Use
their equivalents without the get_
prefix.
The send_file
functions have been deprecated. Use send_files
instead by
passing a Vec.
CurrentUser::distinct
and User::distinct
have been deprecated. Instead use
CurrentUser::tag
and User::tag
.
User::get
has been deprecated. Instead, use UserId::get
.
Role::edit_role
has been deprecated, renaming it to Role::edit
.
time
has been removed as a direct dependency, moving to chrono
.
Public-facing fields that return time::Timespec
or were a String in ISO-3339
format are now chrono::DateTime<UTC>
s. Instead use its methods for what was
being done with the Timespec
s or strings.
User::direct_message
and User::dm
now accept a builder to allow for more
complete, yet simple use out of the methods. Instead of passing a &str
, use
the provided builder:
// old
user.dm("hello")?;
// new
user.dm(|m| m.content("hello"))?;
Client::login
has been deprecated. Instead use Client::new
:
use serenity::Client;
use std::env;
// old
let client = Client::login(&env::var("DISCORD_TOKEN")?);
// new
let client = Client::new(&env::var("DISCORD_TOKEN")?);
Member::guild_id
is now no longer an Option<GuildId>
-- just a GuildId
.
Since this is now always present, Member::find_guild
has been deprecated since
the cache now never searches the cache for the guild ID.
The deprecated GuildChannel
methods get_invites
, get_message
,
get_messages
, get_reaction_users
, and get_webhooks
have been removed. Use
their alternatives, such as GuildChannel::invites
, instead.
- Add support for retrieving invites with counts (@hsiW) c:302d771
- Handle message type 7 (@fwrs) c:8f88c6b
- Add
GuildChannel::permissions_for
c:6502ded - Add
Invite::url()
,RichInvite::url()
c:3062981 - Reasonable derive Debug on all items c:9dae9e6
- Add more examples and improve others c:8c0aeac
- Support adding reactions when creating message (@acdenisSK) c:77b5b48
- Add
VerificationLevel::Higher
c:7dbae6b - Add
CurrentUser::invite_url
(@Roughsketch, @Flat) c:e033ff3, c:0b95db9 impl From<char> for ReactionType
c:2afab7c- Implement multiple attachments (@Flat) c:46b79dd
- Add
_line
+_line_safe
methods toMessageBuilder
(@Roughsketch) c:543b604 - Add docs for
CurrentUser
(@Roughsketch) c:921f7f4 - Add cache docs (@Roughsketch) c:d367a70
- Add docs and tests for framework (@Roughsketch) c:4267bdb
- Add
Content
forMessageBuilder
(@eLunate) c:060b06e - Include more info on ratelimiting debugs c:d37461b
- Add
User::refresh
c:8c04d31 - Add some model docs (@Roughsketch) c:c00f349
- Add
Message::channel()
c:063a52f - Add
CurrentUser::default_avatar_url
c:2d09152 - Add
CurrentUser::face()
,User::face()
c:d033909 - Deserialize embed footers c:e92b667
- Add
Member::permissions
c:39a28d3 (@acdenisSK) - Add
wait
parameter tohttp::execute_webhook
c:dc73d1a
- Don't skip
@everyone
role when checking channel overwrites (@Roughsketch) c:b468cbf - Allow
unreachable_code
lint incommand!
macro (@Flat) c:eb43b9c - Fix incorrect attempted
send_file
deserialization c:0102706 - Fix ratelimits causing 429s in certain situations c:f695174
- Check last heartbeat acknowledged in heartbeater c:ec9b1c7
- Make client join shards and return c:175d3a3
- Make client starts return an error c:858bbf2
- Ws read/write timeout after 90s to avoid infinite blocking c:1700a4a
- Fix negative nonces failing to deserialize c:d0b64cd
- Use HTTPS Connector with remaining HTTP functions c:0d218e0 (@Roughsketch)
- Restructure modules c:9969be6
- Change
create_permission
to take a reference c:aea9885 - Remove deprecated
GuildChannel
methods c:ab7f113 Guild::create_channel
doesn't require mutability c:494cc50- Deprecate
*User::distinct
, add*User::tag
c:6579b1f - Deprecate
User::get
c:afc571f - Deprecate
Role::edit_role
, addRole::edit
c:c00f349 - Switch to chrono c:990e611
- Make
User::direct_message
/User::dm
accept a builder c:11a02db - Deprecate
Client::login
, addClient::new
c:7990381 - Make
Member::guild_id
non-optional c:b4bd771 - Remove
Context::channel_id
andContext::queue
c:8b504ad - Make the framework's
dynamic_prefix
accept an&Message
c:2845681 - Deprecate
Channel::delete_messages
,Channel::delete_permission
c:7fc49d8 - Make
Message::nonce
aserde_json::Value
c:c832009
- Remove deprecated
login_bot
usage from docs (@hsiW) c:ae395f4 - Fix call to
VoiceManager::join
in example 06 (@barzamin) c:6853daf - Sort default help by group/command names (@Roughsketch) c:93416cd
- Move
CreateGroup
docs to the struct c:71f3dbb - Don't create group in help if no commands to show (@Roughsketch) c:4f5fbb5
- Move user avatar method logic out c:8360f32
- Upgrade rust-websocket and hyper, switch to native-tls c:8f8a059
- Fix broken links in README c:51c15d0
- Remove unused
cookie
dependency c:92f4ec2 - Switch from
#[doc(hidden)]
topub(crate)
c:32e07e4 (@acdenisSK) - Re-export all errors from the prelude c:db0f025
- Rework shard logic and shard handling c:601704a
0.2.0 - 2017-05-13
This is a very large release with a number of rewritten components. The cache
has been rewritten to make use of memory more efficiently, the models directory
has been re-organized, structures are now deserialized via serde and
serde_derive
- instead of the custom decoding build script we had - with a
number of bugfixes and other various changes and additions.
Thanks to the following for their contributions this release:
Replace uses of ext::cache::ChannelRef
with model::Channel
.
The following ext::cache::Cache
method signatures are now encased in
Arc<RwLock>
s and should be handled appropriately:
call
channel
guild
guild_channel
group
member
role
user
Additionally, GuildId::find
and UserId::find
now return
Option<Arc<RwLock>>
s.
Member::display_name
now returns a Cow<String>
instead of a &str
.
client::Context
has had most of its methods removed. The methods were mostly
a copy of those on ChannelId
. Upgrade by instead calling methods on
ChannelId
:
command!(foo(ctx) {
let _ = ctx.say("hello");
});
// is now written as:
command!(bar(_ctx, msg) {
let _ = msg.channel_id.say("hello");
});
CreateMessage::nonce
has been removed. Instead, simply do not provide a nonce.
ChannelId::edit_message
now has an argument signature of:
&self, message_id: M, f: F
where F: FnOnce(CreateMessage) -> CreateMessage, M: Into<MessageId>
instead of
&self, message_id: M, text: &str, f: F
where F: FnOnce(CreateEmbed) -> CreateEmbed, M: Into<MessageId>
To account for this change, modify code like so:
channel_id.edit_message(message_id, "new content", |e| e);
// now:
channel_id.edit_message(message_id, |m| m.content("new content"));
Message::edit
has also had an argument signature updated to:
&mut self, f: F where F: FnOnce(CreateMessage) -> CreateMessage
from:
&mut self, new_content: &str, embed: F where F: FnOnce(CreateEmbed) -> CreateEmbed
To account for this change, modify code like so:
message.edit("new content", |e| e.description("test"));
// now:
message.edit(|m| m.content("new content").embed(|e| e.description("test")));
client::rest::accept_invite
, Invite::accept
, and RichInvite::accept
have
been removed. Instead, do not attempt this, as they were userbot functions.
Selfbot support has been completely removed. Review the commit message for the long list of details.
Group calls and guild sync have also been removed. Read the commit message for all the details.
Instead of defining multiple separate error messages for command framework message dispatches, match the dispatch error in a single method:
// old code:
client.with_framework(|f| f
.configure(|c| c
.command_disabled_message("The command `%command%` was disabled")
.blocked_guild_message("The owner of this guild has been blocked")
.invalid_permission_message("You don't have permission to use this command")));
// new code:
client.with_framework(|f| f.on_dispatch_error(|_, msg, err| {
match err {
DispatchError::CommandDisabled(command_name) => {
let _ = msg.channel_id.say(&format!("The command `{}` was disabled", command_name));
},
DispatchError::BlockedGuild => {
// this change also allows for more intelligent error messages:
if let Some(guild) = msg.guild() {
let owner_id = guild.read().unwrap().owner_id;
if let Some(user) = CACHE.read().unwrap().user(owner_id) {
let c = format!("The owner - {} - has been blocked", user.name);
let _ = msg.channel_id.say(&c);
return;
}
}
let _ = msg.channel_id.say("The owner of this guild has been blocked");
},
DispatchError::LackOfPermissions(_) => {
let _ = msg.channel_id.say("You don't have permission to use this command");
},
}
}));
All functions prefixed with get_
have had the prefix removed. For example,
Guild::get_webhooks()
is now Guild::webhooks()
.
Instead of using model::permissions::general()
, model::permissions::text()
,
and model::permissions::voice()
, use
model::permissions::{PRESET_GENERAL, PRESET_TEXT, PRESET_VOICE}
.
- Add
say
method toGroup
,GuildChannel
,PrivateChannel
c:a0bb306 - Add missing
send_file
/send_message
impls c:bad9ac3 - Add
Message::guild
c:9ef5522 - Add Shard Id helpers c:1561f9e
- Implement
From<&str> for ReactionType
c:e7110ad - Check for embed lengths on message sends c:e1079e9
- Add
is_nsfw
check to channels c:9268f9c - Add missing
Member::kick
helper c:83b1d96 - Derive
Eq
,Hash
,PartialEq
onReactionType
c:86a4e00 (@acdenisSK)
- Handle unsuccessful responses before decoding c:7e254c5
- Uniquely ratelimit message deletions c:01f6872
- Fix Member methods due to variant
joined_at
values c:cd914f5 - Fix deadlock on channel create event for DMs c:6b0b9b2 (@sschroe)
- Default to using
[0, 1]
shards c:f0d1157 - Fix ratelimiting for
Route::None
routes c:5bf6c2d - Fix guild leaving result c:ae352ea
- Fix permissions when sending to DMs or groups c:404a089 (@acdenisSK)
- Check if message starts with
dynamic_prefix
result c:9ec05e7 (@Roughsketch) - Trim content before parsing framework args c:e6712c9 (@Roughsketch)
- Optimize caching c:0c9ec37
- Remove most
Context
methods c:585af23 - Remove sending message nonces c:9c04a19
- Standardize message editing methods c:3c7c575
- Remove invite accepting c:e4b484f
- Remove selfbot support c:d9118c0 c:c74cc15
- Switch to using serde for deserialization c:f6b27eb
- Update the ways errors are handled in dispatch c:31aae7d (@fwrs)
- Deprecate methods prefixed with
get_
c:3f03f9a - Framework help commands now accept a slice of args c:ff4437a
- Make
User.discriminator
au16
c:0f41ffc - Use constants for preset permissions c:70d4e75
- Make logo more better c:6e11a10 (@Flat)
- Fix incorrect cache example c:b96f85c
- Rework the models directory c:9114963
- Change permission values to byte literals c:c8536c1
- Fix example in README c:d4fc8b6
0.1.5 - 2017-02-08
This is a release to fix broken nightly builds, due to a change in how rustc handles lifetimes, with a few performance optimizations and other fixes.
For Group::send_message
, PrivateChannel::send_message
,
and GuildChannel::send_message
, instead of passing in only a &str
of
content, use a CreateMessage
builder:
// assuming a `channel` is bound
// old signature:
channel.send_message("hello");
// new signature:
channel.send_message(|m| m.content("hello"));
Instead of calling message_id.get_reaction_users
and passing in a ChannelId
,
call channel_id.get_reaction_users
and pass in the MessageId
. Note that the
latter already existed.
// assuming `channel_id`, `message_id`, and `reaction_type` are bound
// removed method:
message_id.get_reaction_users(channel_id, reaction_type, Some(10), None);
// alternative method:
channel_id.get_reaction_users(message_id, reaction_type, Some(10), None);
- Register the
status
user setting for user accounts (e.g. online, invisible) c:0b9bf91 - Expose and document ratelimiting structures c:eb09f2d
- Add method to
EditGuild
to transfer ownership c:f00e165
- Fix potential unreachable pattern warning in
command!
macro c:97f9bd1 - Fix value of 'browser' in shard identify c:4cf8338
- Remove lifetime on Search builder c:6f33a35
- Avoid re-requesting the gateway URL when autosharding (optimization) c:e891ebe
- Avoid cloning on non-framework message create events (opt.) c:b7cbf75
- Avoid cloning the context on event dispatches (opt.) c:5ee5fef
- Optimize presence update for current user in cache (opt.) c:9392f61
- Make
GLOBAL
ratelimit mutex a unit (opt.) c:55ccaca - Resume when restarting WS sender/receiver c:04cfaa9
0.1.4 - 2017-01-26
This is a general release for pretty much everything, from new features to bugfixes to a switch to a more OOP style. The current minimum supported version is rustc 1.13+.
The next release will be v0.2.0, which will feature serde codegen support along with a rewrite of the framework. It will be a more modularized version of the library. v0.2.0 will require rustc 1.15+, due to the stabilization of Macros 1.1.
Thanks to the following for contributions this release:
Two of the major highlights of this release are that the broken pipe issue has
been fixed, and the library is more OOP now and therefore no longer relies on
the Context
to get stuff done. The methods
feature flag has been removed.
When formatting using Display
for ChannelId
s, RoleId
s, and UserId
,
instead of formatting use their Mentionable
equivilants:
use serenity::model::{ChannelId, RoleId, UserId};
// old
assert_eq!(format!("{}", ChannelId(1)), "<#1>");
assert_eq!(format!("{}", RoleId(2)), "<@&2>");
assert_eq!(format!("{}", UserId(3)), "<@3>");
// new
assert_eq!(format!("{}", ChannelId(1).mention()), "<#1>");
assert_eq!(format!("{}", RoleId(2)).mention()), "<@&2>");
assert_eq!(format!("{}", UserId(3).mention()), "<@3>");
When using EmbedBuilder::{image, thumbnail}
, instead of calling another
builder, provide url
s directly:
use serenity::model::Embed;
// old
Embed::fake(|e| e
.image(|i| i.url("https://not.zey.moe/me.png"))
.thumbnail(|t| t.url("https://not.zey.moe/me2.png")));
// new
Embed::fake(|e| e
.image("https://not.zey.moe/me.png")
.thumbnail("https://not.zey.moe/me2.png"));
When specifying a sharding method, instead of passing a u8
for sharding info,
pass a u64
:
use serenity::Client;
let client = Client::login_bot(&env::var("DISCORD_TOKEN").unwrap());
// old
client.start_shard(1u8, 5u8); // or
client.start_shards(5u8); // or
client.start_shard_range([1u8, 3u8], 8u8);
// new
client.start_shard(1u64, 5u64); // or
client.start_shards(5u64); // or
client.start_shard_range([1u64, 3u64], 8u64);
Client.shards
is now private. Instead of accessing it, don't.
When creating a Colour
struct yourself, instead of specifying a single value
field, pass a single tuple value:
use serenity::utils::Colour;
// old
Colour {
value: 0,
}
// new
Colour(0);
Instead of using Attachment::download_to_directory
to download an attachment
to a directory, do it yourself:
use std::fs::File;
use std::io::Write;
// assuming an `attachment` has already been bound
// old
attachment.download_to_directory("./attachments");
// new
let bytes = attachment.download().unwrap();
let filepath: PathBuf = path.as_ref().join(&attachment.filename);
let mut f = File::create(&filepath);
let _ = f.write(&bytes);
Instead of calling Message::is_webhook()
:
// assuming a `message` has already been bound
// old
let _ = message.is_webhook();
// new
let _ = message.webhook_id.is_some();
Instead of PartialGuild::find_role(role_id)
:
use serenity::model::RoleId;
// assuming a `guild` has already been bound
// old
let _ = guild.find_role(RoleId(1));
// new
let _ = guild.roles.get(RoleId(1));
Instead of Guild::{get_channel, get_member}
, call:
use serenity::model::{ChannelId, UserId};
// assuming a `guild` has already been bound
// old
let _ = guild.get_channel(ChannelId(1));
let _ = guild.get_member(UserId(2));
// new
let _ = guild.channels.get(ChannelId(1));
let _ = guild.members.get(UserId(2));
Instead of using Context
methods, use their Id
or other struct equivalents.
- the
voice
feature no longer requires thecache
feature to be enabled c:7b45f16 - the
framework
feature no longer requires thecache
feature to be enabled c:86cd00f Guild
,InviteGuild
, andPartialGuild
now havesplash_url
methods c:d58c544- Expose
Message::webhook_id
for messages sent via webhooks (@fwrs) c:a2cbeb6 - Framework: add option to ignore webhooks or DMs (@fwrs) c:8e2c052
- Added documentation for creating embed timestamps (@foxbot) c:66546d3
- Allow
time::Tm
to be passed into the embed timestamp field, in addition to a direct string c:b001234 - Add
Client::on_message()
example (@indiv0) c:bcb70e8 - Support webp/gif avatars/icons in URL methods c:ab778f8
- Update current user presence in cache on set c:5b275fc
- Add
CurrentUser
/User::static_avatar_url()
methods to generate webp URLs c:c36841d - Command (batch) alias support (@fwrs) c:f96b6cc
- Command example field for help command (@fwrs) c:f96b6cc
- Added "Meibi Pink" to the
Colour
struct (@hsiW) c:2cb607d - Register support for
4011
code (too many shards) (@SunDwarf) c:93f3c60 - Added "Rohrkatze Blue" to the
Colour
struct (@bippum) c:345e140 - Add
User::default_avatar_url()
c:e85e901 - Add
Message::content_safe()
to avoid@everyone
/@here
s (@fwrs) c:e5a83dd - Add
Member::distinct()
,User::distinct()
(@fwrs) c:e5a83dd - Document that messages can't be older than 14 days when bulk deleting (@fwrs) c:0a2f5ab
- Add shard latency tracking (
stolenborrowed from brayzure/Eris) c:096b0f5 - Add guild chunking c:3ca7ad9
User::avatar_url
no longer mentions the user in the generated URL c:0708ccf- Framework:
owners_only
check now functions only if the author of a message is an owner (@fwrs) c:6355288 - Framework: fix command cooldown timer (would always say to wait
i64::MAX
seconds) c:fafa363 - Framework: the
before
closure is now properly run when a message is sent by the owner c:760a47a CurrentApplicationInfo
now properly decodes due toflags
no longer being sent c:2a743ce- Fix
Message::delete()
permission check c:4229034 - Framework: properly split messages on character boundary limits; aka thanks Unicode c:c01f238
- Remove need to import Context/Message in command macros (@acdenisSK) c:abd22d2
- Fix a ton of gateway stuff [c:94fc85b], c:f894cfd, c:f894cfd
- Specify
command!
macro signature as returningstd::result::Result
c:e9aae9c - Fix dependency description in example 06 (@DeltaEvo) c:92309b2
- Return a
User
fromrest::get_user
-- not aCurrentUser
c:f57a187 - Fix shards always booting at index 0 c:83b29d5
- Wait 5 seconds between shard boots to avoid session invalidations c:fb4d411
- Use CDN for default avatars c:69ec62a
- Fix
Resumed
event payload decoding c:c2e8b69 - Fix
CurrentApplicationInfo
decoding withoutrpc_origins
c:38db32e - Reboot shard on broken pipe; fixes a lot of gateway problems c:76f9095
- Make
rest::execute_webhook
be a POST c:c050c59
- Framework: argument number is now displayed on parsing error (@fwrs) c:fb07751
- Id display formatters use the direct u64 instead of mentioning;
format!("{}", UserId(7))
will format into"7"
instead of"<@7>"
c:933ee89 - Default the framework's
use_quotes
for quote parsing tofalse
(wastrue
) c:38a484d - The
CreateEmbed
builder now has directimage
andthumbnail
methods instead of one-method builders c:68c473d - Accept
u64
shard counts to allow using more than 255 shards (instead ofu8
s) c:ada07fa - Remove user logout endpoint c:70bf22a
- Don't abuse unicode for message content sanitization (@fwrs) c:2b237e7
- Change
Colour
struct to be a tuplestruct c:a8acd61 - Make a single POST on guild role create c:147cf01
- Switch to a mostly-fully OOP approach c:651c618
- Rename
webhooks
methods toget_webhooks
(eg:GuildChannel::webhooks()
-->GuildChannel::get_webhooks()
) c:e8a9086 - Make
Guild::create_channel
and related functions return aGuildChannel
c:5918d01
- Cleaned up YAML definition layouts c:00fb61b
- Gateway identify compression code is now simplified c:2416813
- Gateway Event decoders are now abstracted to individual struct implementations c:5fe6a39
- Simplify
Role
's'Ord
impl (@emoticon) c:6a887b2 - Slightly simplify
Shard::set_presence
c:5c40e85 - Rename repo references from
serenity.rs
toserenity
(@fwrs) c:3348178 - Simplify
Reaction::delete()
c:1594961 - Abstract large threshold number to a constant c:f3f74ce
- Avoid a needless string clone on login c:d3389be
- Avoid a lot of
Arc
/Message
/RwLock
clones c:8c5ee70
0.1.3 - 2016-12-14
This is a hotfix for applying a PR and fixing a major bug in the plain help command.
Thanks to the following for contributions this release:
None.
- Blocking individual users and guilds in commands, add blocking commands, and configuring owners of bots (@fwrs) c:a39647d
- The plain help command now properly sends a message when requesting information about a command c:7b4b154
- Groups are now on their own lines in the plain help command c:16bd765
0.1.2 - 2016-12-14
This release focuses on revamping the framework, adding a large amount of configuration and overall features. v0.1.3 will be focused on performance optimizations and code cleanup.
Thanks to the following for contributions this release:
v0.1.2 can now be retrieved from the crates.io listing.
When using EmbedBuilder::{image, thumbnail}
, instead of calling another
builder, provide url
s directly:
use serenity::model::Embed;
// old
Embed::fake(|e| e
.image(|i| i.url("https://not.zey.moe/me.png"))
.thumbnail(|t| t.url("https://not.zey.moe/me2.png")));
// new
Embed::fake(|e| e
.image("https://not.zey.moe/me.png")
.thumbnail("https://not.zey.moe/me2.png"));
- Allow mentionable structs to be used as command arguments (@fwrs) c:626ffb2
- Implemented
From<Embed> for CreateEmbed
c:7914274 - Framework command builder, quoted arguments, multi-prefixes (@fwrs) c:8f24aa3
{Emoji,EmojiIdentifier}::url
c:ef6eba3- Command groups and buckets c:daf92ed
- Fix mentioning in the
MessageBuilder
(@fwrs) c:13de5c2 - Don't mutate token for bots on profile change c:8effc91
- Deprecate
CreateEmbedImage::{height, width}
andCreateEmbedThumbnail::{height, width}
- All internal
try!
s have been converted to use?
syntax (@acdenisSK) c:f69512b
0.1.1 - 2016-12-05
v0.1.1 is a "features that v0.1.0 should have had" and "miscellaneous work" release. v0.1.2 will be focused on the framework, while v0.1.3 will be focused on performance optimizations.
Thanks to the following for contributions this release:
v0.1.1 can now be retrieved from the crates.io listing.
When calling rest::get_guilds
, instead of passing no parameters, pass a
GuildPagination
variant and a limit
:
use serenity::client::rest::{self, GuildPagination};
use serenity::model::GuildId;
// before
rest::get_guilds();
// after
rest::get_guilds(GuildPagination::After(GuildId(777)), 50);
- The following colours to the Colour struct:
Message::guild_id
as a quick method for retrieving the Id of a message's guild c:bceb049CurrentUser::guilds()
to get the current user's guilds. Meant for use with selfbots c:57c060fCurrentUser::edit()
to edit the current user's profile settings c:16d1b3cUser::distinct
to format a string with theusername#discriminator
combination (@fwrs) c:31becb1Member::colour
to retrieve the member's colour (@fwrs) c:43a5c5d- Roles can now be directly compared (
role1 < role2
) for hierarchy c:143337a - Documentation:
- A custom shared state (not the Cache) can now be accessed and mutated across
commands/contexts, through the use of
Context.data
's ShareMap. See example 06 for an example
rest::start_integration_sync
/Context::start_integration_sync
now properly work (@abalabahaha) c:7f04179- Role positions can now be negative; fixes issues where a guild's @everyone role (and other roles) are negative c:f847638
Context::move_member
's signature is now correct c:4de39da- The
command!
macro now publicly exports functions. This allows commands created via this macro to be separated into different modules or crates c:62ed564
rest::get_guilds
now supports pagination of guilds, as the output is now limited to 100 c:57c060f
Colour::dark_green
is now sorted alphabetically (@khazhyk) c:4a14b92- Simplify the colour macro c:bb97211
- Capitalize the hex value for
Colour::blitz_blue
([@Kiseii]) [c:daa24ec]
0.1.0 - 2016-11-30
Initial commit.