-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds better abilities to check, what exactly was rate limited #2901
base: next
Are you sure you want to change the base?
Commits on Jun 9, 2024
-
Remove temporary
Vec
usage in thehttp
module (serenity-rs#2624, s……erenity-rs#2646) This avoids having to allocate to store fixed length (replaced with normal array) or fixed capacity (replaced with `ArrayVec`) collections as vectors for the purposes of putting them through the `Request` plumbing. Slight behavioral change - before, setting `params` to `Some(vec![])` would still append a question mark to the end of the url. Now, we check if the params array `is_empty` instead of `is_some`, so the question mark won't be appended if the params list is empty. Co-authored-by: Michael Krasnitski <42564254+mkrasnitski@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 062e685 - Browse repository at this point
Copy the full SHA 062e685View commit details -
Configuration menu - View commit details
-
Copy full SHA for 007c360 - Browse repository at this point
Copy the full SHA 007c360View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8df3f63 - Browse repository at this point
Copy the full SHA 8df3f63View commit details -
Remove
*_arc
methods (serenity-rs#2654)These are unnecessary. Accepting `impl Into<Arc<T>>` allows passing either `T` or `Arc<T>`.
Configuration menu - View commit details
-
Copy full SHA for 651380e - Browse repository at this point
Copy the full SHA 651380eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c564016 - Browse repository at this point
Copy the full SHA c564016View commit details -
Put
Message::thread
behind aBox
(serenity-rs#2658)This trades a heap allocation for messages sent along with thread creation for `Message`'s inline size dropping from 1176 bytes to 760 bytes,
Configuration menu - View commit details
-
Copy full SHA for be79bdb - Browse repository at this point
Copy the full SHA be79bdbView commit details -
Replace
Vec
andString
withFixedArray
andFixedString
for al……l models (serenity-rs#2656) This shrinks type sizes by a lot; however, it makes the user experience slightly different: - `FixedString` must be converted to String with `.into()` or `.into_string()` before it can be pushed to, but dereferences to `&str` as is. - `FixedArray` must be converted to `Vec` with `.into()` or `.into_vec()` before it can be pushed to, but dereferences to `&[T]` as is. The crate of these types is currently a Git dependency, but this is fine for the `next` branch. It needs some basic testing, which Serenity is perfect for, before a release will be made to crates.io.
Configuration menu - View commit details
-
Copy full SHA for 1526f9b - Browse repository at this point
Copy the full SHA 1526f9bView commit details -
Fix truncation when using
FixedString<u8>
where multibyte character……s push over the limit (serenity-rs#2660)
Configuration menu - View commit details
-
Copy full SHA for 2db8487 - Browse repository at this point
Copy the full SHA 2db8487View commit details -
Configuration menu - View commit details
-
Copy full SHA for f20e8fc - Browse repository at this point
Copy the full SHA f20e8fcView commit details -
Switch to
i64
in methods associated withCreateCommandOption
(ser……enity-rs#2668) This commit: - switches from `u64` to `i64` in `CreateCommandOption::min_int_value` and `CreateCommandOption::max_int_value` to accommodate negative integers in Discord's integer range (between -2^53 and 2^53). Values outside this range will cause Discord's API to return an error. - switches from `i32` to `i64` in `CreateCommandOption::add_int_choice` and `CreateCommandOption::add_int_choice_localized` to accommodate Discord's complete integer range (between -2^53 and 2^53). Values outside this range will cause Discord's API to return an error.
Configuration menu - View commit details
-
Copy full SHA for 686c5dc - Browse repository at this point
Copy the full SHA 686c5dcView commit details -
Get rid of the duplicate users cache (serenity-rs#2662)
This cache was just duplicating information already present in `Guild::members` and therefore should be removed. This saves around 700 MBs for my bot (pre-`FixedString`). This has to refactor `utils::content_safe` to always take a `Guild` instead of`Cache`, but in practice it was mostly pulling from the guild cache anyway and this means it is more likely to respect nicknames and other information, while losing the ability to clean mentions from DMs, which do not matter.
Configuration menu - View commit details
-
Copy full SHA for b59131f - Browse repository at this point
Copy the full SHA b59131fView commit details -
Change
Embed::fields
to useFixedArray
(serenity-rs#2674)`Embed::fields` previously had to stay as a `Vec` due to `CreateEmbed` wrapping around it, but by implementing `Serialize` manually we can overwrite the `Embed::fields` with a normal `Vec`, for a small performance hit on serialization while saving some space for all stored `Embed`s.
Configuration menu - View commit details
-
Copy full SHA for 916dd12 - Browse repository at this point
Copy the full SHA 916dd12View commit details -
Use
FixedArray
andFixedString
in model enums (serenity-rs#2675)Simply missed these when finding and replacing.
Configuration menu - View commit details
-
Copy full SHA for eb0a598 - Browse repository at this point
Copy the full SHA eb0a598View commit details -
Bitpack boolean fields using fancy proc macro (serenity-rs#2673)
This uses the `bool_to_bitflags` macro to remove boolean (and optional boolean) fields from structs and pack them into a bitflags invocation, so a struct with many bools will only use one or two bytes, instead of a byte per bool as is. This requires using getters and setters for the boolean fields, which changes user experience and is hard to document, which is a significant downside, but is such a nice change and will just become more and more efficient as time goes on.
Configuration menu - View commit details
-
Copy full SHA for 5589be3 - Browse repository at this point
Copy the full SHA 5589be3View commit details -
Use
nonmax::NonMax*
types inOption
s wherever possible (serenity-……rs#2681) This swaps fields that store `Option<Int>` for `Option<NonMaxInt>` where the maximum value would be ludicrous. Since `nonmax` uses `NonZero` internally, this gives us niche optimisations, so model sizes can drop some more. I have had to include a workaround for [serenity-rs#17] in `optional_string` by making my own `TryFrom<u64>`, so that should be removable once that issue is fixed. [serenity-rs#17]: LPGhatguy/nonmax#17
Configuration menu - View commit details
-
Copy full SHA for 4e6d123 - Browse repository at this point
Copy the full SHA 4e6d123View commit details -
Remove unused warning
#[allow(...)]
s (serenity-rs#2682)A couple of clippy bugs have been fixed and I have shrunk model sizes enough to make `clippy::large_enum_variant` go away.
Configuration menu - View commit details
-
Copy full SHA for e92d095 - Browse repository at this point
Copy the full SHA e92d095View commit details -
Get rid of
unsafe
(serenity-rs#2686)A discord bot library should not be using the tools reserved for low level OS interaction/data structure libraries.
Configuration menu - View commit details
-
Copy full SHA for 22a8ec8 - Browse repository at this point
Copy the full SHA 22a8ec8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 613c04c - Browse repository at this point
Copy the full SHA 613c04cView commit details -
Swap Id from
NonZero
toNonMax
(serenity-rs#2689)Discord seems to internally default Ids to 0, which is a bug whenever exposed, but this makes ID parsing more resilient. I also took the liberty to remove the `From<NonZero*>` implementations, to prevent future headaches, as it was impossible to not break public API as we exposed `NonZero` in `*Id::parse`.
Configuration menu - View commit details
-
Copy full SHA for ca917e1 - Browse repository at this point
Copy the full SHA ca917e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 205ef79 - Browse repository at this point
Copy the full SHA 205ef79View commit details -
Store
Request::params
as a slice instead of owningArrayVec
(sere……nity-rs#2694) This, 1. shrinks the size of Request, when copied around, as it doesn't have to store the max capacity at all times 2. shrinks llvm-lines (compile time metric) for my bot in debug from `1,153,519` to `1,131,480` as no monomorphisation has to be performed for `MAX_PARAMS`.
Configuration menu - View commit details
-
Copy full SHA for 18298ac - Browse repository at this point
Copy the full SHA 18298acView commit details -
Revert
Request::params
back toOption
(serenity-rs#2695)Follow-up to serenity-rs#2694. When `Request::params` was made into an ArrayVec, the `Option` around it was removed in order to avoid having to add a turbofish on `None` to specify the value of `MAX_PARAMS`. Also, `Request::new` also needed to be changed so that the value of `MAX_PARAMS` could be inferred. Now that the field is a slice again, we can wrap it in `Option` again (at no cost to size, thanks to niche opts). We ensure we never store the redundant `Some(&[])` by checking for an empty slice and storing `None` instead. This way, we ensure we never read an empty slice out of the `Some` variant.
Configuration menu - View commit details
-
Copy full SHA for 9697a72 - Browse repository at this point
Copy the full SHA 9697a72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 918ab9b - Browse repository at this point
Copy the full SHA 918ab9bView commit details -
Feature gate
#[instrument]
macros (serenity-rs#2707)The instrument macros generate 2% of Serenity's release mode llvm-lines, and are proc-macros so hurt compile time in that way, so this limits them to opt-in. This commit also fixes the issues that the instrument macro was hiding, such as results that didn't ever error and missing documentation.
Configuration menu - View commit details
-
Copy full SHA for e5c0b74 - Browse repository at this point
Copy the full SHA e5c0b74View commit details -
Remove
impl Into<Option>
(serenity-rs#2701)This signature is hard to use as `None` cannot infer the type of the generic. I also replaced `Option<u8>` with `Option<NonMaxU8>` as it's more efficient and will make the user think of the maximum value.
Configuration menu - View commit details
-
Copy full SHA for a99e06b - Browse repository at this point
Copy the full SHA a99e06bView commit details -
Get rid of
IntoIterator
generics wherever they are inefficent (sere……nity-rs#2698) This removes inefficient `IntoIterator` generics and instead takes what is actually required. I also reworked `reorder_channels` to allow for keeping the generic, as it actually does only just need iterator semantics.
Configuration menu - View commit details
-
Copy full SHA for 43e9b42 - Browse repository at this point
Copy the full SHA 43e9b42View commit details -
Clean up
Ratelimiter
(serenity-rs#2687)Previously, someone assumed that `Ratelimiter` was going to be cloned, so put a ton of `Arc`s everywhere. This was unneeded, and before dashmap, so the buckets were also stored massively inefficiently. This fixes all that. I had to shuffle around the `Ratelimit` methods a little bit to return their sleep time instead of sleeping themselves, so I didn't have to hold a dashmap lock over an `.await`.
Configuration menu - View commit details
-
Copy full SHA for 8b8f0d2 - Browse repository at this point
Copy the full SHA 8b8f0d2View commit details -
Handle overflow checks in central locations (serenity-rs#2697)
This removes multiple error variants and overall cleans up the codebase by moving overflow checks into two `ModelError` variants.
Configuration menu - View commit details
-
Copy full SHA for 79d87e7 - Browse repository at this point
Copy the full SHA 79d87e7View commit details -
Shrink size and clean up
Error
(serenity-rs#2700)Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused variants. This will improve performance for any method returning `Result<T>` where `T` is less than the size of `Error` as both `Result`'s `Ok` and `Err` have to be allocated stack space.
Configuration menu - View commit details
-
Copy full SHA for 28993ff - Browse repository at this point
Copy the full SHA 28993ffView commit details -
Remove manual
#[inline]
attributes (serenity-rs#2702)The compiler knows best as inlining is quite complicated. This should help with compile times, significantly.
Configuration menu - View commit details
-
Copy full SHA for 49a4580 - Browse repository at this point
Copy the full SHA 49a4580View commit details -
Remove
Into<*Id>
andAsRef<str>
(serenity-rs#2704)`Into<*Id>` is often entirely unnecessary, and at worst hides the type of the Id with hard-coded Ids. This fixes this by just using the Id type itself, which also helps with monomorphisation bloat. I also removed `AsRef<str>`, as this can just be `&str` without requiring a generic and without requiring a call to as_ref in the function, while also not accidentally taking ownership of a `String` passed in misleadingly.
Configuration menu - View commit details
-
Copy full SHA for a60d9f9 - Browse repository at this point
Copy the full SHA a60d9f9View commit details -
Remove
Event::Unknown
variant (serenity-rs#2708)If deserialization fails, we should allow the specific deserialization error to be logged so that it can be reported to the Serenity maintainers. As it stands, any events that fail to deserialize normally will "succeed" when deserialized into the `Unknown` variant, throwing away any extra information about the error. Because deserialization errors are immediately logged when they happen, explicitly whitelist `Error::Json` in `Shard::handle_event` to prevent duplicate logs.
Configuration menu - View commit details
-
Copy full SHA for 008dffc - Browse repository at this point
Copy the full SHA 008dffcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 06c2c5e - Browse repository at this point
Copy the full SHA 06c2c5eView commit details -
Stop using
Value
in error parsing (serenity-rs#2710)`Value` is bad to use and is slow. I also used `Arc<str>` to store `path` as this is cloned a couple times.
Configuration menu - View commit details
-
Copy full SHA for 1407a28 - Browse repository at this point
Copy the full SHA 1407a28View commit details -
Configuration menu - View commit details
-
Copy full SHA for daa756d - Browse repository at this point
Copy the full SHA daa756dView commit details -
Update to
small-fixed-array
v0.2 (serenity-rs#2711)`small-fixed-array` v0.2 removes implicit truncation and makes all truncations explicit. I also changed FixedString initialization from literals to use `from_str_trunc` to take advantage of SSO if possible.
Configuration menu - View commit details
-
Copy full SHA for 5cd9331 - Browse repository at this point
Copy the full SHA 5cd9331View commit details -
Fix
@everyone
role deserialisation (serenity-rs#2716)The `@everyone` role sometimes has a role position of -1, but not always!
Configuration menu - View commit details
-
Copy full SHA for 2143cb2 - Browse repository at this point
Copy the full SHA 2143cb2View commit details -
Fix
GuildChannel
deserialisation withuser_limit
(serenity-rs#2715)This is documented as max 99 for voice channels, but 10k for stage channels.
Configuration menu - View commit details
-
Copy full SHA for cbccc54 - Browse repository at this point
Copy the full SHA cbccc54View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d1373a - Browse repository at this point
Copy the full SHA 3d1373aView commit details -
Remove dashboard example (serenity-rs#2714)
This example depended on rillrate, which has been archived for over a year.
Configuration menu - View commit details
-
Copy full SHA for 6ce84ed - Browse repository at this point
Copy the full SHA 6ce84edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a8393f - Browse repository at this point
Copy the full SHA 2a8393fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 18724e9 - Browse repository at this point
Copy the full SHA 18724e9View commit details -
Implement
max_concurrency
support when starting shards (serenity-rs……#2661) When a session is first kicked off and we need to start many shards, we can use the value of `max_concurrency` to kick off multiple shards in parallel.
Configuration menu - View commit details
-
Copy full SHA for 98410d1 - Browse repository at this point
Copy the full SHA 98410d1View commit details -
Remove typemap without making everything generic (serenity-rs#2720)
Replaces the typemap with `dyn Any`, which is what typemap used internally anyway. This gives the user more control over locking, removes boilerplate, and is less confusing for beginners to learn.
Configuration menu - View commit details
-
Copy full SHA for 89f7d9c - Browse repository at this point
Copy the full SHA 89f7d9cView commit details -
Provide
Arc<Data>
instead of&Data
(serenity-rs#2722)This incurs an extra ref count, but this should be negligible for the more permissive type. An explanation of how this works is that: - `Arc` is just a shared pointer to `ArcInner` - `ArcInner` stores the concrete Data type - Each `Arc` stores the dyn vtable ptr - `Arc` checks the vtable ptr to get the type id, then it can just give out a new `Arc` referring to the `ArcInner` concretely.
Configuration menu - View commit details
-
Copy full SHA for de8a730 - Browse repository at this point
Copy the full SHA de8a730View commit details -
Add
Client::try_data
to fallibly fetch the data type (serenity-rs#2723Configuration menu - View commit details
-
Copy full SHA for 88af227 - Browse repository at this point
Copy the full SHA 88af227View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3ff024 - Browse repository at this point
Copy the full SHA a3ff024View commit details -
Remove some pedantic lints from the whitelist (serenity-rs#2728)
This also removes the impls of `From<{i32,u64}> for Colour`, as it only makes sense to convert infallibly from `u32`.
Configuration menu - View commit details
-
Copy full SHA for 48fc5a1 - Browse repository at this point
Copy the full SHA 48fc5a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c93108 - Browse repository at this point
Copy the full SHA 3c93108View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5ba9f8 - Browse repository at this point
Copy the full SHA e5ba9f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22b01f2 - Browse repository at this point
Copy the full SHA 22b01f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23ade37 - Browse repository at this point
Copy the full SHA 23ade37View commit details -
Remove
PartialEq
implementations from all builders (serenity-rs#2734)Because builder fields are all private, it doesn't make sense to compare them directly. From a user's perspective, they have no idea what the builder might contain. This also lets us change their internals easier, without worrying about equality.
Configuration menu - View commit details
-
Copy full SHA for d927e16 - Browse repository at this point
Copy the full SHA d927e16View commit details -
Remove various instances of
impl AsRef<T>
(serenity-rs#2736)This should improve compile times even more, by compiling a lot more methods in Serenity, instead of the user's code.
Configuration menu - View commit details
-
Copy full SHA for f5e091f - Browse repository at this point
Copy the full SHA f5e091fView commit details -
Remove
simd-json
support (serenity-rs#2735)`simd-json` is not a performance improvement for Serenity. It has a ton of sketchy uses of `unsafe`, increases the maintenance burden, and leads to Serenity containing a json compatibility layer(!). This commit removes all that, although a faster json decoding implementation is on the table in the future if the compatibility layer is kept out of tree and it is measurably faster for Serenity's usecase.
Configuration menu - View commit details
-
Copy full SHA for 4dac678 - Browse repository at this point
Copy the full SHA 4dac678View commit details -
Fix massive code size of
client::dispatch
(serenity-rs#2739)This replaces fancy iter stuff with just writing the code, and therefore reduces the code size significantly and spawns less tasks.
Configuration menu - View commit details
-
Copy full SHA for 90f52b9 - Browse repository at this point
Copy the full SHA 90f52b9View commit details -
Fix RoleTags deserialisation after removal of simd-json (serenity-rs#…
…2742) There was a comment here that said it was called by simd-json, so I removed the function, but it turns out that serde_json also calls it.
Configuration menu - View commit details
-
Copy full SHA for ed5336a - Browse repository at this point
Copy the full SHA ed5336aView commit details -
Avoid cloning FullEvent in dispatch code (serenity-rs#2740)
Avoids cloning entire event structs when dispatching. To reduce code size and allocations all the state is bundled up into a temporary struct called DispatchContext, but this isn't user facing at all. This regresses code size a bit, but is worth it for runtime performance, and probably reduces actual code sizes as `FullEvent` doesn't have to be moved around as much.
Configuration menu - View commit details
-
Copy full SHA for 5983bd9 - Browse repository at this point
Copy the full SHA 5983bd9View commit details -
Remove the builder trait and only take required arguments (serenity-r…
…s#2741) Removes unnecessary trait, which only limited the signatures to always take `CacheHttp` and required the async_trait boxing and compile time cost. This also makes a lot less methods generic, improving compile times.
Configuration menu - View commit details
-
Copy full SHA for 234278b - Browse repository at this point
Copy the full SHA 234278bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c98094c - Browse repository at this point
Copy the full SHA c98094cView commit details -
Convert enum number into wrapper struct to save type sizes (serenity-…
…rs#2746) Saves a couple bytes in each model by replacing the enums with a simpler and more accurate representation, a newtype with named statics. https://www.diffchecker.com/ohzayL9Z/
Configuration menu - View commit details
-
Copy full SHA for a14480e - Browse repository at this point
Copy the full SHA a14480eView commit details -
Use Arc<str> to store the token (serenity-rs#2745)
`SecretString` is nice to have, but this is more efficient, and `SecretString` is defense in depth we can do without.
Configuration menu - View commit details
-
Copy full SHA for db821e8 - Browse repository at this point
Copy the full SHA db821e8View commit details -
Remove standard framework (serenity-rs#2731)
This PR carries out the removal after the deprecation made on current.
Configuration menu - View commit details
-
Copy full SHA for 9f7a16c - Browse repository at this point
Copy the full SHA 9f7a16cView commit details -
Re-add Secret to bot token (serenity-rs#2748)
This re-adds Secret to the bot token, without losing the `Arc<str>` opt. This works by using a newtype to Zeroise on last drop, using `Arc::get_mut`.
Configuration menu - View commit details
-
Copy full SHA for 2b240da - Browse repository at this point
Copy the full SHA 2b240daView commit details -
Take Arc<Http> in ClientBuilder::new_with_http (serenity-rs#2749)
This allows the user to make a http, pass it off to a background task, then use it in serenity, instead of having to initialize two.
Configuration menu - View commit details
-
Copy full SHA for 2afd573 - Browse repository at this point
Copy the full SHA 2afd573View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0d4090 - Browse repository at this point
Copy the full SHA c0d4090View commit details -
Configuration menu - View commit details
-
Copy full SHA for c91cdea - Browse repository at this point
Copy the full SHA c91cdeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for df125a6 - Browse repository at this point
Copy the full SHA df125a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d08189 - Browse repository at this point
Copy the full SHA 6d08189View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5ee23d - Browse repository at this point
Copy the full SHA b5ee23dView commit details -
Fix
VoiceServerUpdate::guild_id
being wrapped inOption
(serenity……-rs#2766) Noticed by @vicky5124, this does not need to be optional. https://discord.com/developers/docs/topics/gateway-events#voice-server-update
Configuration menu - View commit details
-
Copy full SHA for f5c0d09 - Browse repository at this point
Copy the full SHA f5c0d09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 350da4d - Browse repository at this point
Copy the full SHA 350da4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a3a1226 - Browse repository at this point
Copy the full SHA a3a1226View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf1b35b - Browse repository at this point
Copy the full SHA bf1b35bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f24e3cc - Browse repository at this point
Copy the full SHA f24e3ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9b4ebf - Browse repository at this point
Copy the full SHA a9b4ebfView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5df025 - Browse repository at this point
Copy the full SHA d5df025View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6179cab - Browse repository at this point
Copy the full SHA 6179cabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c41fc1 - Browse repository at this point
Copy the full SHA 4c41fc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a775f1d - Browse repository at this point
Copy the full SHA a775f1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c710468 - Browse repository at this point
Copy the full SHA c710468View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6dd011 - Browse repository at this point
Copy the full SHA c6dd011View commit details -
Configuration menu - View commit details
-
Copy full SHA for f002c9c - Browse repository at this point
Copy the full SHA f002c9cView commit details -
Remove
Channel::name
(serenity-rs#2787)`Channel::name` just called `to_channel` (cloning the entire `Channel`!) and `PrivateChannel::name` or `GuildChannel::name`. `GuildChannel::name` just returned the field of the same name, for consistency with `PrivateChannel::name`. `PrivateChannel::name` returned a non-standard format string that would be very easy to replicate in user code. I also tweaked the signature of `OnlineStatus::name` to stop passing an 8 byte reference to a 1 byte struct, and return `&'static str`.
Configuration menu - View commit details
-
Copy full SHA for 3f29665 - Browse repository at this point
Copy the full SHA 3f29665View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36b9137 - Browse repository at this point
Copy the full SHA 36b9137View commit details -
Configuration menu - View commit details
-
Copy full SHA for 826ac8f - Browse repository at this point
Copy the full SHA 826ac8fView commit details -
Rename
unstable_discord_api
tounstable
and disable it by default (……serenity-rs#2789) This also disables the `#[non_exhaustive]` attribute on `FullEvent` if `unstable` is enabled as a feature. It is already expected that any change to Serenity with `unstable` enabled may or may not break code using this feature and making this enum exhaustive allows for use cases such as fine-grained audit logging, where new variants should be a compiler error. Co-authored-by: Gnome! <david2005thomas@Gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c2b97f8 - Browse repository at this point
Copy the full SHA c2b97f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d9d0f2 - Browse repository at this point
Copy the full SHA 9d9d0f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2283647 - Browse repository at this point
Copy the full SHA 2283647View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b5ba29 - Browse repository at this point
Copy the full SHA 9b5ba29View commit details -
Configuration menu - View commit details
-
Copy full SHA for dde4244 - Browse repository at this point
Copy the full SHA dde4244View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f7831d - Browse repository at this point
Copy the full SHA 8f7831dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d4bbc33 - Browse repository at this point
Copy the full SHA d4bbc33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34fc824 - Browse repository at this point
Copy the full SHA 34fc824View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5638ae9 - Browse repository at this point
Copy the full SHA 5638ae9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92750f5 - Browse repository at this point
Copy the full SHA 92750f5View commit details -
Make Guild::shard_id follow additive features (serenity-rs#2813)
This PR: - Removes the `cache` feature locked function that called shard_count for the user, since that is useless and breaks the "all features should be additive" guidance - Removes the useless example that just showed how to call a function - Removed duplicate documentation on Guild, PartialGuild, and InviteGuild just to direct to the canonical documentation where the function is implemented.
Configuration menu - View commit details
-
Copy full SHA for 551d005 - Browse repository at this point
Copy the full SHA 551d005View commit details -
Remove deprecated
Member
andGuild
methods (serenity-rs#2817)Followup to serenity-rs#2816 --------- Co-authored-by: Alex M. M. <acdenissk69@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a818c36 - Browse repository at this point
Copy the full SHA a818c36View commit details -
Replace
CacheHttp
with&Http
in more methods (serenity-rs#2818)This is possible now more methods are cache-less.
Configuration menu - View commit details
-
Copy full SHA for 998ebae - Browse repository at this point
Copy the full SHA 998ebaeView commit details -
Remove
serde_json::Value
fromHttp
(serenity-rs#2806)This avoids allocating instances of `serde_json::Value`s.
Configuration menu - View commit details
-
Copy full SHA for a9f08fc - Browse repository at this point
Copy the full SHA a9f08fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b46d93 - Browse repository at this point
Copy the full SHA 2b46d93View commit details -
Remove even more impl CacheHttp (serenity-rs#2822)
These were found by auditing .http() calls, instead of just manually looking at `impl CacheHttp`.
Configuration menu - View commit details
-
Copy full SHA for 7db18cd - Browse repository at this point
Copy the full SHA 7db18cdView commit details -
Remove
fs
feature fortokio
by default (serenity-rs#2824)I currently working with wasm on one of my personal projects. I'm would like to use `serenity` to get access to the discord API response models, but currently the library can not the compiled to wasm, because the `tokio/fs` feature is not supported in that target. I went ahead and removed the need to include that feature by default. By the looks of it, it only was used with the `builder` and `model` features, so I conditionally added `tokio/fs` back when those features are being used (the `model` feature already depends on `builder` so that doesn't need to be changed).
Configuration menu - View commit details
-
Copy full SHA for 129337e - Browse repository at this point
Copy the full SHA 129337eView commit details -
Update
reqwest
to v0.12 (serenity-rs#2826)This has to be on the next branch as reqwest is exposed in a couple places.
Configuration menu - View commit details
-
Copy full SHA for 5a232a4 - Browse repository at this point
Copy the full SHA 5a232a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f80311 - Browse repository at this point
Copy the full SHA 6f80311View commit details -
Add resume_gateway_url support (serenity-rs#2832)
This announcement was missed (around August 2022) and probably the cause of a lot of the disconnections.
Configuration menu - View commit details
-
Copy full SHA for 7ace74b - Browse repository at this point
Copy the full SHA 7ace74bView commit details -
Correct documentation for
UserId::to_user
(serenity-rs#2809)The documentation was never updated after serenity-rs#2662 removed the user cache.
Configuration menu - View commit details
-
Copy full SHA for c3f8ca9 - Browse repository at this point
Copy the full SHA c3f8ca9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab8b4cc - Browse repository at this point
Copy the full SHA ab8b4ccView commit details -
Fix AuditLogEntry::user_id (serenity-rs#2846)
This field is documented as nullable but that isn't reflected in the model. I also took the opportunity to replace the Option<Vec> with a default Vec.
Configuration menu - View commit details
-
Copy full SHA for 87345a0 - Browse repository at this point
Copy the full SHA 87345a0View commit details -
Restore match arm for
Error::Gateway
variant (serenity-rs#2847)This was mistakenly removed in serenity-rs#2278 and wasn't caught because of the wildcard pattern in the match.
Configuration menu - View commit details
-
Copy full SHA for b213438 - Browse repository at this point
Copy the full SHA b213438View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d50a65 - Browse repository at this point
Copy the full SHA 3d50a65View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6406655 - Browse repository at this point
Copy the full SHA 6406655View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8edab28 - Browse repository at this point
Copy the full SHA 8edab28View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe0f087 - Browse repository at this point
Copy the full SHA fe0f087View commit details -
Remove permission checks (serenity-rs#2855)
Users should realistically be checking the permissions themselves, or handling the HTTP error from Discord. This removes any cases where permission checking inside the library is broken because of Discord's changes or due to oversights. This also changes the documentation on the prune functionality, this was recently changed to also require `MANAGE_GUILDS` as well as `KICK_MEMBERS`.
Configuration menu - View commit details
-
Copy full SHA for f01fd2b - Browse repository at this point
Copy the full SHA f01fd2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74659fc - Browse repository at this point
Copy the full SHA 74659fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 776185b - Browse repository at this point
Copy the full SHA 776185bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e855379 - Browse repository at this point
Copy the full SHA e855379View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f18f11 - Browse repository at this point
Copy the full SHA 7f18f11View commit details -
Remove RUSTFLAGS from .cargo/config.toml (serenity-rs#2875)
This isn't needed anymore because simd-json has been removed on `next`.
Configuration menu - View commit details
-
Copy full SHA for 3e03891 - Browse repository at this point
Copy the full SHA 3e03891View commit details
Commits on Jun 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for eb8495f - Browse repository at this point
Copy the full SHA eb8495fView commit details
Commits on Jun 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e715b5e - Browse repository at this point
Copy the full SHA e715b5eView commit details
Commits on Jun 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 964c006 - Browse repository at this point
Copy the full SHA 964c006View commit details
Commits on Jun 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 54e207c - Browse repository at this point
Copy the full SHA 54e207cView commit details