Skip to content
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

Open
wants to merge 124 commits into
base: next
Choose a base branch
from

Commits on Jun 9, 2024

  1. Remove temporary Vec usage in the http 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>
    GnomedDev and mkrasnitski committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    062e685 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    007c360 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8df3f63 View commit details
    Browse the repository at this point in the history
  4. Remove *_arc methods (serenity-rs#2654)

    These are unnecessary. Accepting `impl Into<Arc<T>>` allows passing either `T` or `Arc<T>`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    651380e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c564016 View commit details
    Browse the repository at this point in the history
  6. Put Message::thread behind a Box (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,
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    be79bdb View commit details
    Browse the repository at this point in the history
  7. Replace Vec and String with FixedArray and FixedString 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    1526f9b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2db8487 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f20e8fc View commit details
    Browse the repository at this point in the history
  10. Switch to i64 in methods associated with CreateCommandOption (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.
    ARandomDev99 authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    686c5dc View commit details
    Browse the repository at this point in the history
  11. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    b59131f View commit details
    Browse the repository at this point in the history
  12. Change Embed::fields to use FixedArray (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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    916dd12 View commit details
    Browse the repository at this point in the history
  13. Use FixedArray and FixedString in model enums (serenity-rs#2675)

    Simply missed these when finding and replacing.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    eb0a598 View commit details
    Browse the repository at this point in the history
  14. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    5589be3 View commit details
    Browse the repository at this point in the history
  15. Use nonmax::NonMax* types in Options 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
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    4e6d123 View commit details
    Browse the repository at this point in the history
  16. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    e92d095 View commit details
    Browse the repository at this point in the history
  17. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    22a8ec8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    613c04c View commit details
    Browse the repository at this point in the history
  19. Swap Id from NonZero to NonMax (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`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    ca917e1 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    205ef79 View commit details
    Browse the repository at this point in the history
  21. Store Request::params as a slice instead of owning ArrayVec (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`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    18298ac View commit details
    Browse the repository at this point in the history
  22. Revert Request::params back to Option (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.
    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    9697a72 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    918ab9b View commit details
    Browse the repository at this point in the history
  24. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    e5c0b74 View commit details
    Browse the repository at this point in the history
  25. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a99e06b View commit details
    Browse the repository at this point in the history
  26. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    43e9b42 View commit details
    Browse the repository at this point in the history
  27. 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`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    8b8f0d2 View commit details
    Browse the repository at this point in the history
  28. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    79d87e7 View commit details
    Browse the repository at this point in the history
  29. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    28993ff View commit details
    Browse the repository at this point in the history
  30. Remove manual #[inline] attributes (serenity-rs#2702)

    The compiler knows best as inlining is quite complicated. This should
    help with compile times, significantly.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    49a4580 View commit details
    Browse the repository at this point in the history
  31. Remove Into<*Id> and AsRef<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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a60d9f9 View commit details
    Browse the repository at this point in the history
  32. 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.
    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    008dffc View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    06c2c5e View commit details
    Browse the repository at this point in the history
  34. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    1407a28 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    daa756d View commit details
    Browse the repository at this point in the history
  36. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    5cd9331 View commit details
    Browse the repository at this point in the history
  37. Fix @everyone role deserialisation (serenity-rs#2716)

    The `@everyone` role sometimes has a role position of -1, but not always!
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    2143cb2 View commit details
    Browse the repository at this point in the history
  38. Fix GuildChannel deserialisation with user_limit (serenity-rs#2715)

    This is documented as max 99 for voice channels, but 10k for stage
    channels.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    cbccc54 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    3d1373a View commit details
    Browse the repository at this point in the history
  40. Remove dashboard example (serenity-rs#2714)

    This example depended on rillrate, which has been archived for over a
    year.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    6ce84ed View commit details
    Browse the repository at this point in the history
  41. Fix compilation from rebase

    arqunis authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    2a8393f View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    18724e9 View commit details
    Browse the repository at this point in the history
  43. 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.
    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    98410d1 View commit details
    Browse the repository at this point in the history
  44. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    89f7d9c View commit details
    Browse the repository at this point in the history
  45. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    de8a730 View commit details
    Browse the repository at this point in the history
  46. Add Client::try_data to fallibly fetch the data type (serenity-rs#2723

    )
    
    This is mostly for usage in `poise` to provide a nicer error message in
    its situation. I also changed `Client::data` to provide `Arc` as well.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    88af227 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    a3ff024 View commit details
    Browse the repository at this point in the history
  48. 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`.
    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    48fc5a1 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    3c93108 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    e5ba9f8 View commit details
    Browse the repository at this point in the history
  51. Fix compilation from rebase

    arqunis authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    22b01f2 View commit details
    Browse the repository at this point in the history
  52. Fix testing example

    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    23ade37 View commit details
    Browse the repository at this point in the history
  53. 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.
    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    d927e16 View commit details
    Browse the repository at this point in the history
  54. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    f5e091f View commit details
    Browse the repository at this point in the history
  55. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    4dac678 View commit details
    Browse the repository at this point in the history
  56. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    90f52b9 View commit details
    Browse the repository at this point in the history
  57. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    ed5336a View commit details
    Browse the repository at this point in the history
  58. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    5983bd9 View commit details
    Browse the repository at this point in the history
  59. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    234278b View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    c98094c View commit details
    Browse the repository at this point in the history
  61. 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/
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a14480e View commit details
    Browse the repository at this point in the history
  62. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    db821e8 View commit details
    Browse the repository at this point in the history
  63. Remove standard framework (serenity-rs#2731)

    This PR carries out the removal after the deprecation made on current.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    9f7a16c View commit details
    Browse the repository at this point in the history
  64. 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`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    2b240da View commit details
    Browse the repository at this point in the history
  65. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    2afd573 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    c0d4090 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    c91cdea View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    df125a6 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    6d08189 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    b5ee23d View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    f5c0d09 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    350da4d View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    a3a1226 View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    bf1b35b View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    f24e3cc View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    a9b4ebf View commit details
    Browse the repository at this point in the history
  77. Fix compilation from rebase

    arqunis authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    d5df025 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    6179cab View commit details
    Browse the repository at this point in the history
  79. Format unformatted code from rebase

    arqunis authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    4c41fc1 View commit details
    Browse the repository at this point in the history
  80. Remove rebase artifacts in README

    arqunis authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a775f1d View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    c710468 View commit details
    Browse the repository at this point in the history
  82. Minor adjustments

    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    c6dd011 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    f002c9c View commit details
    Browse the repository at this point in the history
  84. 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`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    3f29665 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    36b9137 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    826ac8f View commit details
    Browse the repository at this point in the history
  87. Rename unstable_discord_api to unstable 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>
    cheesycod and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    c2b97f8 View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    9d9d0f2 View commit details
    Browse the repository at this point in the history
  89. Configuration menu
    Copy the full SHA
    2283647 View commit details
    Browse the repository at this point in the history
  90. Configuration menu
    Copy the full SHA
    9b5ba29 View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    dde4244 View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    8f7831d View commit details
    Browse the repository at this point in the history
  93. Configuration menu
    Copy the full SHA
    d4bbc33 View commit details
    Browse the repository at this point in the history
  94. Configuration menu
    Copy the full SHA
    34fc824 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    5638ae9 View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    92750f5 View commit details
    Browse the repository at this point in the history
  97. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    551d005 View commit details
    Browse the repository at this point in the history
  98. Remove deprecated Member and Guild methods (serenity-rs#2817)

    Followup to serenity-rs#2816
    
    ---------
    
    Co-authored-by: Alex M. M. <acdenissk69@gmail.com>
    GnomedDev and arqunis committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a818c36 View commit details
    Browse the repository at this point in the history
  99. Replace CacheHttp with &Http in more methods (serenity-rs#2818)

    This is possible now more methods are cache-less.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    998ebae View commit details
    Browse the repository at this point in the history
  100. Remove serde_json::Value from Http (serenity-rs#2806)

    This avoids allocating instances of `serde_json::Value`s.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a9f08fc View commit details
    Browse the repository at this point in the history
  101. Configuration menu
    Copy the full SHA
    2b46d93 View commit details
    Browse the repository at this point in the history
  102. Remove even more impl CacheHttp (serenity-rs#2822)

    These were found by auditing .http() calls, instead of just manually
    looking at `impl CacheHttp`.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    7db18cd View commit details
    Browse the repository at this point in the history
  103. Remove fs feature for tokio 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).
    UserIsntAvailable authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    129337e View commit details
    Browse the repository at this point in the history
  104. Update reqwest to v0.12 (serenity-rs#2826)

    This has to be on the next branch as reqwest is exposed in a couple
    places.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    5a232a4 View commit details
    Browse the repository at this point in the history
  105. Configuration menu
    Copy the full SHA
    6f80311 View commit details
    Browse the repository at this point in the history
  106. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    7ace74b View commit details
    Browse the repository at this point in the history
  107. Correct documentation for UserId::to_user (serenity-rs#2809)

    The documentation was never updated after serenity-rs#2662 removed the user cache.
    jamesbt365 authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    c3f8ca9 View commit details
    Browse the repository at this point in the history
  108. Configuration menu
    Copy the full SHA
    ab8b4cc View commit details
    Browse the repository at this point in the history
  109. 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.
    GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    87345a0 View commit details
    Browse the repository at this point in the history
  110. 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.
    mkrasnitski authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    b213438 View commit details
    Browse the repository at this point in the history
  111. Configuration menu
    Copy the full SHA
    3d50a65 View commit details
    Browse the repository at this point in the history
  112. Configuration menu
    Copy the full SHA
    6406655 View commit details
    Browse the repository at this point in the history
  113. Configuration menu
    Copy the full SHA
    8edab28 View commit details
    Browse the repository at this point in the history
  114. Configuration menu
    Copy the full SHA
    fe0f087 View commit details
    Browse the repository at this point in the history
  115. 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`.
    jamesbt365 authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    f01fd2b View commit details
    Browse the repository at this point in the history
  116. Configuration menu
    Copy the full SHA
    74659fc View commit details
    Browse the repository at this point in the history
  117. Configuration menu
    Copy the full SHA
    776185b View commit details
    Browse the repository at this point in the history
  118. Configuration menu
    Copy the full SHA
    e855379 View commit details
    Browse the repository at this point in the history
  119. Configuration menu
    Copy the full SHA
    7f18f11 View commit details
    Browse the repository at this point in the history
  120. Remove RUSTFLAGS from .cargo/config.toml (serenity-rs#2875)

    This isn't needed anymore because simd-json has been removed on `next`.
    jamesbt365 authored and GnomedDev committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    3e03891 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    eb8495f View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Adds "OwnedRoute"

    TheCataliasTNT2k committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    e715b5e View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

  1. Configuration menu
    Copy the full SHA
    964c006 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Configuration menu
    Copy the full SHA
    54e207c View commit details
    Browse the repository at this point in the history