A Rust library for the Discord API.
This is a light release to fix compilation on https://docs.rs.
Thanks to the following for their contributions:
Thanks to the following for their contributions:
native-tls
backend (@nickelc) c:440f0fa
guild_id
(@nickelc) c:4dbf3d0
users
argument to utils::content_safe
(@GnomedDev) c:c18e889
image_hash
key (@nickelc) c:985212a
.git-blame-ignore-revs
file (@nickelc) c:3a3e399
CreateInteractionResponseData
to set or unset the ephemeral flag (@pascalharp) c:283af98
model::Timestamp
from a UNIX timestamp (@nickelc) c:66f8be7
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD
(@nickelc) c:a75ac69
GatewayIntents
(@vaporox) c:14fc9c6
GUILD_MESSAGES
intent bitflag (@Bloectasy) c:6f28486
Webhook::get_message
for retrieving messages sent by a webhook (@GnomedDev) c:a2b388f
GenericId
snowflake type for unspecific entities in audit logs (@nickelc) c:146b1ac
Attachment
option type (@JellyWX) c:9866a85
Copy
and Clone
traits for the audit action enums (@nickelc) c:dfac5d7
model::Timestamp
(@nickelc) c:3aca5ca
Default
trait for all bitflags types (@nickelc) c:92de3da
allowed_mentions
in the ExecuteWebhook
builder (@mkrasnitski) c:71583c3
locale
and guild_locale
fields in interactions (@Rstar284) c:b4d0765
data
and filename
methods to AttachmentType
(@mkrasnitski) c:ad9e987
ActivityType
s (@nickelc) c:b4e4add
serde_json
and simd-json
(@vicky5124) c:f61fae4
USE_EXTERNAL_STICKERS
permission and audit log support for stickers (@drklee3) c:1fbf1e9
Request
system (@drklee3) c:57582d2
Http::get_guilds
(@tylerd008) c:06d101b
Dispatch
error hook (@kangalioo) c:c2130a8
Interaction
to ModalSubmitInteraction
(@gradiuscypher) c:e187f73
EventHandler
in an Arc
directly to the Client
(@squili) c:16c2089
set_components
to EditMessage
(@Chronophylos) c:57c0826
message_id
field to audit log options for pinned/unpinned messages (@nickelc) c:3a64da1
add_member
to Guild
and GuildId
(@vaporox) c:82c2415
allowed_mentions
in EditMessage
(@acdenisSK) c:86dbaee
str::split_once
for parsing webhooks and user tags (@mkrasnitski) c:fbfe0cf
utils::content_safe
(@mkrasnitski) c:32cb31c
misc::Mention{able}
into their own model/mention
module (@mkrasnitski) c:f5458f1
Permissions
(@devtomio) c:10410a2
Ratelimiter::new()
(@vaporox) c:f4f310d
Http
(@vaporox) c:f8bc937
CacheHttp
requirements (@vaporox) c:a36353b
Http::application_id
in ready event handler (@vaporox) c:c5f9cbe
target_id
unconditionally (@nickelc) c:c5dc80b
ResolvedTarget
enum variants (@nickelc) c:404ab03
model::misc
(@mkrasnitski) c:5a0e8f4
Guild::member_named
's implementation to use utils::parse_user_tag
(@mkrasnitski) c:8c9670f
ArgumentConvert
compatible without the cache
feature (@kangalioo) c:cdaa70c
MESSAGE_CONTENT
intent is now privileged (@kangalioo) c:63a1000
Option
in more places in the ClientBuilder
(@vaporox) c:8bca94a
unstable_discord_api
feature guard from the application commands (@nickelc) c:1ce8060
Into<Content>
(@mkrasnitski) c:c9e4f27
shard_id
methods synchronous (@nickelc) c:787e7d9
ApplicationCommandInteractionDataResolved
(@nickelc) c:56cab22
ApplicationFlags
bitflags in the application info structs (@nickelc) c:33d402f
std::fmt
imports and Display
& Debug
trait implementations (@nickelc) c:7a8f2cf
parking_lot
to 0.12 (@xfix) c:d5b5970
async-tungstenite
to 0.17 (@nickelc) c:4ff348e
tokio::task::Builder
usage behind a feature flag (@Milo123459) c:9624af0
to_user
and to_channel
functions (@Milo123459) c:1be625b
model::guild::audit_log
module public (@nickelc) c:7d99bcb
AuditLogs
(@nickelc) c:7823b6e
utils
module (@nickelc) c:5a4fd2a
Change
struct into an enum with the actual types (@nickelc) c:594a00d
dashmap
to v5.1.0 (@acdenisSK @vicky5124 @Some-Dood) c:6298f67 c:342fdbb c:28e0311
serde
traits for the audit Action
enum directly (@nickelc) c:0f77d31
HttpBuilder
to avoid unwrap
calls (@vaporox) c:89499b2
utils::token
module (@nickelc) c:97ea22f
utils::content_safe
and dependants into its own module (@nickelc) c:ab4e7fe
VoiceState
with helper structs (@nickelc) c:14e747d
Vec
allocation by using the iterators directly (@nickelc) c:4556594
emoij
parameters in component builders to Into<ReactionType>
(@nickelc) c:8fe7127
levenshtein
crate (@nickelc) c:5f6ad2a
is_false
function from the model::utils
module (@nickelc) c:5b43bdb
bitflags!
macro for ApplicationFlags
(@nickelc) c:dd5661c
DateTime<Utc>
with a newtype struct Timestamp
(@nickelc) c:1577efc
bitflags!
macro with serde implementation (@nickelc) c:4d5f4f1
nightly
build job (@nickelc) c:fbba88c
Route::stage_instances
to &'static str
(@nickelc) c:a3dd38e
api!
macro (@nickelc) c:a95ac81
CacheUpdate
into the cache::event
module (@nickelc) c:afba7f5
bitflags!
macro instead of the undocumented macro (@nickelc) c:701d759
GuildStatus
with UnavailableGuild
in the ready event (@nickelc) c:5063de1
Permissions
without an extra String
allocation (@nickelc) c:f26fb7f
Webhook::edit
into three separate methods (@mkrasnitski) c:1715476
RoleTags
(@nickelc) c:363a311
GuildWelcomeScreen
and dependant types into a separate module (@nickelc) c:bc46711
cdn!
macro (@nickelc) c:9a2cce8
DiscordJsonError
(@nickelc) c:080f5b0
GatewayIntents
to model
(@Gentoli) c:f46bbc8
Http
to take &JsonMap
instead of JsonMap
(@mkrasnitski) c:b1389aa
actions-rs
GitHub actions with equivalent commands (@nickelc) c:48de0e5
clippy::unwrap_used
for tests globally (@nickelc) c:f9f6079
Examples
build job by just checking instead of building (@nickelc) c:34881b9
GuildWelcomeChannel
and dependant types (@nickelc) c:dfe38c2
hashmap_to_json_map
function into the json
module (@nickelc) c:34c484c
Role
creation and update into a helper function (@nickelc) c:25cdfeb
EventHandler
by removing redundant guild_id
parameters (@nickelc) c:a5f9a4f
GuildMembersChunkEvent
struct manually (@nickelc) c:ae93570
User
's discriminator de-/serialization into the model::user
module (@nickelc) c:178f62c
model::id
module (@nickelc) c:68d5049
match
es where the match expression is a bool to be more idiomatic (@nickelc) c:cb5d090
HashMap
values serialization in the other serde modules (@nickelc) c:5ce8177
#[serde(with = "...")]
(@nickelc) c:173c1a6
HttpBuilder
to be synchronous (@Some-Dood) c:fa68bb1
category_id
field of channel types to parent_id
(@AldanTanneo) c:cf1a897
ApplicationCommand
message type to ChatInputCommand
(@HarmoGlace) c:bc9315c
DashMap
in its internals (@vicky5124) c:9e2b9df
Message::channel
(@kangalioo) c:c889c7e
Result
s (@acdenisSK) c:a8cd62d
Embed::colour
an Option
(@drklee3) c:5223ea0
RichInvite::inviter
optional and replace InviteUser
with User
(@acdenisSK) c:82e5095
reqwest
v0.11.7 and async-tungstenite
v0.16 (@nickelc) c:c80084c c:d1a3ded c:a168913
clippy::pedantic
(@nickelc) c:f6a3700
unused_imports
warning (@nickelc) c:a9d1919
Publish docs
build job (@nickelc) c:11fff2f
Route::ChannelsIdMessagesId
(@mkrasnitski) c:1a9bb54
Change::Type
variant (@nickelc) c:3f93af8
PermissionOverwrite
(@nickelc) c:1f13d70
AttachmentType::Image
(@mkrasnitski) c:0632019
communication_disabled_until
data in member update & chunk events (@nickelc) c:bb638c0
JOIN_MESSAGES
constant to be up to date (@acdenisSK) c:6219fec
e09_create_message_builder
example when the time
feature is enabled (@nickelc) c:74f4396
builder,unstable_discord_api
(@Gentoli) c:eda64a6
ActivityFlags
(@nickelc) c:1725627
MessageFlags
and missing constants (@nickelc) c:1a0cc66
EmojiId
serialization in the ReactionType
serialization (@nickelc) c:5114d80
UserId
with ApplicationId
(@kangalioo) c:4b2c4d9
Integration::synced_at
(@vicky5124) c:983d0e4
PresenceUser
's discriminator
field (@acdenisSK) c:584d3a9
EmojiIdentifier
's FromStr
impl (@kangalioo) c:faebd0c
Message::edit
's lifetimes (@acdenisSK) c:22a3f64
Activity::url
is a valid URL at a type-level (@hybras) c:3f985b5
Presence::user
to properly handle optional fields (@kangalioo) c:a3a861c
codespell
(@acdenisSK) c:4eee51c
titel
-> title
) (@acdenisSK) c:519ea83
communication_disabled_until
field if cached member exists (@drklee3) c:7a8adfb
Error::Num
enum variant (@nickelc) c:2596927
ClientBuilder::application_id
field (@nickelc) c:d7ef273
Error::Rustls
enum variant (@nickelc) c:8d3a079
found_group_prefix
parameter (@vaporox) c:e283b51
update_cache_timeout
from CacheAndHttp
(@vaporox) c:c2b9445
*tls_backend_marker
features (@vaporox) c:16661a3
client::Extras
struct (@nickelc) c:1ed7ac5
ApplicationInfo
& BotApplication
structs (@nickelc) c:1e427c6
tokio
0.2 compatibility (@xfix) c:04a57c3
#[doc(cfg(...))]
(@acdenisSK) c:602bcb6
model::guild::Target
enum (@nickelc) c:b767215
AuditLogs
(@nickelc) c:16dcc69
Error::description
implementation (@nickelc) c:63cdeec
Arc
for reqwest::Client
(@vaporox) c:a1cdd7f
Component
enum (@nickelc) c:1e11fb4
arbitrary_precision
feature (@nickelc) c:bc77218
Activity
(@nickelc) c:4e7c60a
#[cfg(feature = "utils")]
attributes on model methods (@nickelc) c:0675fd1
NeverFails
error type (@nickelc) c:5774572
ClientBuilder
(@kangalioo) c:e6039c4
VoiceRegion::vip
field (@almeidx) c:e748deb
Shard::is_shutdown
(@rasm47) c:0ccb793
Box
indirection on framework
. (@Lakelezz) c:2f48379
GuildChannel::send_message
note (@MathyouMB) c:73ff5ba
kankyo::load()
in example 06 (@ben-brook) c:db101fd
Thanks to the following for their contributions:
timeout
doc alias to various methods (@Milo123459) c:1d05a1e
banner
and accent_color
fields to User
(@drklee3) c:9e10d54
get_*
methods for many ClientBuilder
fields (@kangalioo) c:90dae53
get_webhook_from_url
(@mkrasnitski) c:b026f00 c:6bd2f74 c:7b89775
cargo make
to the Running Examples section (@kafinsalim) c:47a297b
min_value
and max_value
to slash command options (@kangalioo) c:cfd518e
SUPPRESS_JOIN_NOTIFICATION_REPLIES
system channel flag (@almeidx) c:6121fd0
ClientBuilder
for retrieving the current token (@kangalioo) c:6f87d25
poise
to the "Projects extending Serenity" section (@vicky5124) c:bfb5f13
STAGE_INSTANCE
, STICKER
, and THREAD
(@woongzeyi) c:0bc3ce0
defer
helper methods for deferring interactions (@Milo123459) c:d50628e
ApplicationCommand::version
field (@HarmoGlace) c:c85d44a
From<Datetime>
for Timestamp
(@drklee3) c:b905554
#[required_permissions(perms)]
requirements (@woongzeyi) c:f9de6c5
set_component
method to respective builders (@JellyWX) c:99eba2b
ContextMenuCommand
message type (@HarmoGlace) c:2a571d3
model::guild::GuildStatus
enum as deprecated (@nickelc) c:bd1342e
Region
(@nickelc) c:2dcb9b3
slow_mode_rate
/rate_limit
methods and field (@nickelc) c:5c1e31e
model::guild::Region
enum as deprecated (@nickelc) c:6d476cf
Attachment
s by calling Bytes::to_vec
(@nickelc) c:f630f32
write_all
variant in the Attachment::download
example (@acdenisSK) c:a8b4e2f
Formatter::write_str
directly instead of writeln
for string literals (@nickelc) c:6a0106c
permissions::PRESET_*
constants (@nickelc) c:fc7c76a
u64
value of AttachmentId
s public (@nickelc) c:5379d3e
*Id::created_at
method by using Utc.timestamp_millis
(@nickelc) c:1977e9f
rustfmt
edition to match library edition (@mkrasnitski) c:4f2a73b
time
from dependency tree (@KaDiWa4) c:d9c8980
Configuration::prefix
to accept types that implement ToString
(@mkrasnitski) c:738465f
tokio
module behind tokio*
features (@nickelc) c:921ff6f
ClientBuilder::type_map_insert
in examples where it makes sense (@nickelc) c:c3358cf
tracing_subscriber
initialization in the examples (@nickelc) c:46f7608
tokio::spawn
with spawn_named
(@Milo123459 @acdenisSK) c:5f81d4a c:247c073 c:b2197db
match
with the matches!
macro (@Milo123459) c:6987175
Member
parsing if User
is not in the cache in ArgumentConvert
(@kangalioo) c:6085aad
Sticker::pack_id
as optional (@Atakku) c:cf040cb
MessageComponentInteraction::message
to not be partial (@HarmoGlace) c:f915fee
Message::crosspost
(@OverHash) c:b180f21
ReactionType
deserialization (@nickelc) c:fe946df
InteractionApplicationCommandDataFlags
(@nickelc) c:62b9c84
permissions::PRESET_GENERAL
(@nickelc) c:707697e
#[help]
to generate its variables without an extra underscore (@JohnTheCoolingFan) c:df47df1
Permissions
bitflags (@AldanTanneo) c:0acabdf
command_attr
's macros (@Friz64) c:5b7a23c
MessageBuilder
documentation (@mbenoukaiss) c:eb29760
CreateApplicationCommandPermissions
public and fix documentation links (@Squili) c:7392f3f
Thanks to the following for their contributions:
Client
builder. (@Splingush) c:ea8ec29
ApplicationCommandOption
(@Splingush) c:312ae16
Event
to get related user, guild, channel, and message IDs (@sbrocket) c:0aa1a6c
PartialEq
, Eq
, PartialOrd
, Ord
, and Hash
for UserPublicFlags
(@KangarooCoder) c:e7ba5bf
Cache::channel_messages_field
(@kangalioo) c:ca02662
Guild::stage_instances
(@HarmoGlace) c:13cf056
Http::new_with_token
(@squili) c:537753b
Parse
trait and add support for most applicable model types (@kangalioo) c:eb14984
http::Error
's Display
implementation (@kangalioo) c:ce97f9e
Message
builders (@kangalioo) c:0be7d1a
Interaction::user
field (@HarmoGlace) c:9d18334
GuildChannel::send_message
work in threads (@kangalioo) c:fb203ae
GuildChannel
collector functionality (@kotx) c:413e3ef
MessageUpdateEvent
(@sbrocket) c:6192107
false
to EditMessage::suppress_embeds
(@sbrocket) c:47b9afb
cliend_id
typo (@vicky5124) c:5cb9cb9
Interaction
's Option
fields if they are None
(@sbrocket) c:c21f052
parse_token
(@adumbidiot) c:3fba372
CreateSelectMenuOption
's description
method (@HarmoGlace) c:cb30408
This is a release primarily to publish support for slash command buttons and dropdowns, but includes improvements and fixes for other things. For instance:
CacheHttp
implementation for Http
.Guild
and PartialGuild
by implementing missing methods.Message::reply
(and Message::reply_ping
).Thanks to the following for their contributions:
CacheHttp
for Http
(@acdenisSK) c:5c9c194
Activity
buttons (@HarmoGlace) c:2635f7b
set_embed
to EditMessage
(@Gabriel-Paulucci) c:073c22f
roles
method on GuildId for retrieving the guild's roles (@JellyWX) c:38a39f5
validate_token
checks (@kangalioo) c:132fd68
application_id
of Http
when creating a Client
(@drklee3) c:1744883
Message::reply(_ping)
(@kangalioo) c:22d2276
DiscordJsonError
messages (@HarmoGlace) c:97c01ee
create_webhook_with_avatar
(@JellyWX) c:d390ca1
This is an amendment release to revert a breaking change that was overlooked when releasing 0.10.6
. The removed-then-reverted code no longer works because of a breaking change by Discord themselves in version 8 of their API, but regardless, minor versions (y
in 0.x.y
) cannot include breaking changes for parts of Serenity's stable API. To prevent users from depending on 0.10.6
, it has been yanked from https://crates.io.
Thanks to the following for their contributions:
This release adds a plethora of additions and changes (and a few bugfixes), mainly improving conformity to Discord's API. Speaking of which, special thanks goes to @HarmoGlace, who, with his hard work, generously added and improved support to features of the Discord API such as Slash Commands and other things.
Among the most important highlights of this release are:
region
field for the Guild
and PartialGuild
structures. The region is now set per voice channel.Unknown
variant whenever Discord adds a type/kind. This prevents runtime errors resulting from deserialisation of model types due to unrecognised types/kinds.#[command]
, #[help]
, and #[check]
functions. With a little hint, the compiler should report more detailed and accurate error messages for the return type of the functions.serenity::http::DiscordJsonError
.Thanks to the following for their contributions:
Team::name
field (@HarmoGlace) c:07f15ad
MemberUpdate
event (@nitsuga5124) c:3a6eb58
content_type
field to Attachment
(@nitsuga5124) c:1b17732
CreateEmbed::timestamp
(@legendofmiracles) c:d0b404d
Permissions
instead of String
for the PartialMember::permissions
field (@HarmoGlace) c:3b662e0
Unknown
variant for new model types (@acdenisSK) c:cdbd14b
before
for accuracy in the framework example (@sudomann) c:392a534
Message::mention_channels
with constraints (@zacck) c:8ab0800
guild_id
(@HarmoGlace) c:01f70db
DiscordJsonError::errors
field if present (@HarmoGlace) c:bab4d78
(Partial)Guild::region
(@acdenisSK) c:b995482
dead_code
lint for ClientBuilder::token
(@acdenisSK) c:8e13e74
ActivityType
's documentation (@Sei4or) c:dca5c45
mut
modifiers in builder code (@acdenisSK) c:9334af5
Thanks to the following for their contributions:
GuildChannel::{rtc_region, video_quality_mode}
fields (@drklee3) c:95c2f78
#[doc]
comments using \$
(@acdenisSK) c:dbc40cb c:cc184a4
User::public_flags
field (@miqbalrr @acdenisSK) c:b999f46 c:8ab0305
Parse
trait for some model types (@kangalioo) c:3088652
#[hook]
macro (@acdenisSK) c:412f5a9
EditGuild
to match current Discord API (@Lakelezz) c:feda47c
collector
feature (@acdenisSK) c:a04291f
Suggestions::{as_vec, join}
methods public (@Daggy1234) c:4186996
Activity
constructor methods to use ToString
(@acdenisSK) c:859355c
Member
(@acdenisSK) c:909bf8e
#[doc]
attributes (@acdenisSK) c:166c248
allow_dm
is false (@acdenisSK) c:16e7556
Thanks to the following for their contributions:
#[doc(cfg)]
(@acdenisSK) c:b192609
Thanks to the following for their contributions:
#[doc]
attributes to #[description]
for groups (@acdenisSK) c:1cbc935
MessageType
(@merlleu) c:8f38985 c:e5ae947
#[lacking_conditions]
and #[wrong_channel]
(@aria-7553) c:8931c4c
Member
model (@acdenisSK) c:810b033
unwrap()
(@Th3-M4jor) c:3f93c87
Guild
, GuildId
, PartialGuild
, and Interaction
(@Th3-M4jor) c:abfbb9f
Http
when building the Client
(@acdenisSK) c:0e2b648
similar_commands
(@Lakelezz) c:5892db2
cache
feature for MembersIter
and GuildId::members_iter
(@AriusX7) c:4ed30c3
tracing
0.1.23 (@nickelc) c:2a21347
embeds
field in MessageUpdateEvent
back to Embed
(@cab404) c:8133a43
log
feature for tracing
(@DrBluefall) c:73e6d8a
ShardManagerContainer
in the e06_sample_bot_structure
example public (@Daggy1234) c:dfd0b32
msg
parameter when creating a tracing span (@acdenisSK) c:cb6b528
token
and add field kind
to Webhook
(@acdenisSK) c:de72951
Available
segment in help if empty. (@Lakelezz) c:6b6e5fe
NotAuthor
(@Lakelezz) c:1ab52a0
MessageCollector
(@s0lst1ce) c:291e4f2
Client::data
's documentation (@aria-7553) c:2be89e2
Configuration::no_dm_prefix
's documentation (@aria-7553) c:4477690
tracing
(@acdenisSK) c:10de463
WebSocketGatewayClientExt::send_chunk_guild
to not get disconnected by Discord's gateway (@lapin-b) c:2f835a3
WebSocketGatewayClientExt::send_resume
(@Prof-Bloodstone) c:2854e6b
e05_command_framework
example (@dapper-gh) c:e59314e