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

SQLx encode/decode support #2514

Closed
wants to merge 306 commits into from
Closed
This pull request is big! We’re only showing the most recent 250 commits.

Commits on May 30, 2023

  1. Reduce size of shard info and turn it into a struct (serenity-rs#1984)

    This replaces the `[u64; 2]` shard info with `ShardInfo { id: u32, total: u32 }`.
    
    Co-authored-by: nickelc <[email protected]>
    2 people authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    5d80f7b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd28c50 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8c1dff7 View commit details
    Browse the repository at this point in the history
  4. Preserve values for unknown enum variants (serenity-rs#2008)

    The `enum_number!` macro now takes the whole enum definition and generates
    `From` trait implementations to convert a value to the enum and back.
    
    The implementations can then be picked up by `serde` with
    `#[serde(from = "u8", into = "u8")]` to (de)serialize the types.
    
    ```
    enum_number! {
        #[derive(Clone, Copy, Debug, Deserialize, Serialize)]
        #[serde(from = "u8", into = "u8")]
        pub enum Foo {
            A = 1,
            B = 2,
            _ => Unknown(u8),
        }
    }
    ```
    
    BREAKING CHANGE: The `Unknown` variant now takes the unknown value
    and the removed `fn num() -> u64` method can be replaced
    with `let v = u8::from(kind)`.
    nickelc authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    0f4291c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bee6771 View commit details
    Browse the repository at this point in the history
  6. Remove Shard prefix in ShardInfo logging (serenity-rs#2014)

    Before `ShardInfo`:
    `[serenity::gateway::shard]: [Shard [15, 33]] ...`
    
    Currently:
    `[serenity::gateway::shard]: [Shard ShardInfo { id: 15, total: 33 }] ...`
    
    After:
    `[serenity::gateway::shard]: [ShardInfo { id: 15, total: 33 }] ...`
    GnomedDev authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    d713199 View commit details
    Browse the repository at this point in the history
  7. Remove unneeded #[must_use] attribute

    The returned `Result` is already marked as `#[must_use]`.
    nickelc authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    4e9d942 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b8253dc View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ac1a4b1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e3bda85 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    10ea78f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    585b7e2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    30682f0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d233a61 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    283f7ed View commit details
    Browse the repository at this point in the history
  16. Replace json::from_number with into() (serenity-rs#2034)

    Both `Value` types implement `From` for their number variants.
    nickelc authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    659de9a View commit details
    Browse the repository at this point in the history
  17. Merge application command & autocomplete interactions (serenity-rs#2031)

    The structs are almost identical except for the `focused` field for the
    current autocompleted option and that the `resolved` data map is not
    sent for autocomplete interactions.
    
    The entities from the `CommandData::resolved` data map are no longer
    cloned for the option values during deserialization. But the resolved
    options and values can be accessed via the `CommandData::options()` method.
    
    For autocomplete interactions `CommandData::autocomplete()` returns the
    current autocompleted option + value.
    
    BREAKING CHANGES:
    - `ApplicationCommandInteraction` is now used for application commands
      and their autocomplete interaction.
    
    - The `CommandDataOptionValue`'s variants no longer have the cloned
      entities from the `CommandData::resolved` data map.
      See the `CommandData::options` method.
    
    - The fields `value`, `kind`, `options` and `focused` of `CommandDataOption`
      are streamlined into the `CommandDataOptionValue` enum with new variants
      for subcommands, subcommand groups and autocomplete.
    nickelc authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    dfa1a77 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    18801fd View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    7263b22 View commit details
    Browse the repository at this point in the history
  20. Fix Timestamp having a fallible From impl (serenity-rs#2032)

    Co-authored-by: Michael Krasnitski <[email protected]>
    GnomedDev and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    ba8edf8 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5b0458f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    a03c461 View commit details
    Browse the repository at this point in the history
  23. Fix deserialisation for reaction events

    To simplify the deserialisation implementation for `Event`, it was
    changed to use serde's native support for `enum` representations that
    are adjacently tagged (meaning in a text form like JSON, the tag is in
    one field, the data in the other field).
    
    This helped in trimming the lines of code we have to maintain; however,
    it did break reaction events whose names are prepended `MESSAGE_`, which
    serde could not account for when renaming, for instance, `ReactionAdd`
    to SCREAMING_SNAKE_CASE -> `REACTION_ADD`, when it should have been
    `MESSAGE_REACTION_ADD`.
    
    This commit manually renames the reaction events to have `MESSAGE_` at
    the beginning of their event names.
    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    b81bd56 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    0d226d6 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    d61342f View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a2c6b0e View commit details
    Browse the repository at this point in the history
  27. Revert "Clean up dispatch and unnecessary clones in client (serenity-…

    …rs#2019)"
    
    This reverts commit de05e5b because it
    broke shard code to the point where it just crashes, preventing from
    even a simple ping-pong bot from running.
    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    c2ac952 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    73716b8 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    42301a4 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    e70e79c View commit details
    Browse the repository at this point in the history
  31. Fix compilation errors that arose from rebasing

    Additionally, adapt some code to the `next` branch.
    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    de2f8cd View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    516574d View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    a6cbc86 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    1eacf13 View commit details
    Browse the repository at this point in the history
  35. Fix some builders returning unsendable Futures (serenity-rs#2069)

    Due to how the permissions lookups were being performed, the Futures
    were being marked `!Send` because `GuildRef` is also `!Send`. So, we
    unfortunately have to clone the guild we get from the cache.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    aa427a6 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    ed3d3bf View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    64ba5a1 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    32fed4b View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    327cf4d View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    521eb1b View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    a89563f View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    878786b View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    9b471ec View commit details
    Browse the repository at this point in the history
  44. Enforce required fields for builders (serenity-rs#2087)

    This commit adds enforcement for unconditionally required fields on builders.
    It does so by removing the implementation of `Default` on those builders and
    adding a `new` method that takes the required fields as argument.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    08711cd View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    843d211 View commit details
    Browse the repository at this point in the history
  46. Fix issues from rebase

    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    4c93d3c View commit details
    Browse the repository at this point in the history
  47. Use fallback endpoints in Webhook::{edit,delete} if no token is set (

    …serenity-rs#2104)
    
    If the `Webhook::token` field is `None` when these functions are called,
    attempt to use the alternate authenticated endpoint instead of erroring.
    Also, add audit_log_reason parameter to `Http::edit_webhook_with_token`.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    f5860be View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    b70aebf View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    1f8b06d View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    2c59d50 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    f339052 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    e48d9c1 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    73395d5 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    95d55ba View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    bd38a10 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    b10809d View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    d586c2b View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    11118d3 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    89cfc82 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    0ff08b8 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    8e80e3b View commit details
    Browse the repository at this point in the history
  62. Remove parse_token (serenity-rs#2162)

    It was broken due to tokens not being an officially documented format, and the
    format having changed silently since being implemented. `validate_token` still
    exists, but it does less intrusive check.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    23f9ea5 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    adf1ffc View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    84ce5d4 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    bed0462 View commit details
    Browse the repository at this point in the history
  66. Fix http and gateway features (serenity-rs#2172)

    Previously, you couldn't even build Serenity if you had just `http` or just `gateway` enabled.
    And, `gateway` used to depend on `http` and `utils` which is non-sensical. Both these things
    are fixed now.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    d592d41 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    0e50bd0 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    99496a7 View commit details
    Browse the repository at this point in the history
  69. Keep embeds in EditInteractionResponse by default (serenity-rs#2179)

    This also adds a new `testing` crate meant to host small snippets to verify
    correctness for all new pull requests.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    d564323 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    63e515a View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    9c30678 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    9861527 View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    ac629c5 View commit details
    Browse the repository at this point in the history
  74. Include new features in documentation (serenity-rs#2193)

    Documentation had a hard coded list of features (two duplicated copies of them,
    actually). The new `interactions_endpoint` was not among them, so that API was
    completely absent from the docs.
    
    This commit adds an internal `_docs` feature that enables all features that
    should be documented. The doc generation now refers to `_docs` instead of
    writing out the features
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    ff63b1e View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    a227868 View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    76144a5 View commit details
    Browse the repository at this point in the history
  77. Test JSON instead of serde tokens (serenity-rs#2200)

    Removes serde_test dependency and cuts down on needless verbosity by testing
    only what we really need to test. We need to verify *JSON* de-/serialization is
    correct; where a lot of serde's extra metadata doesn't apply.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    69fb684 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    a5b1a49 View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    2e205a1 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    6b9ed1f View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    a4ef8e7 View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    ff2a387 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    23ffae3 View commit details
    Browse the repository at this point in the history
  84. Configuration menu
    Copy the full SHA
    0affda8 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    f99ae78 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    7126490 View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    591f3b1 View commit details
    Browse the repository at this point in the history
  88. Clean up dependencies (serenity-rs#2212)

    This:
    - removes dependencies: `cfg-if`, `mime`, `tokio-test`
    - makes dependencies optional: `fxhash`, `mime_guess`
    - puts each dependency in `Cargo.toml` on a single line
    - puts dependency attributes in consistent order (version, package/path,
        default-features, features, optional)
    - groups dependencies by category
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    a2876bf View commit details
    Browse the repository at this point in the history
  89. Configuration menu
    Copy the full SHA
    3e99479 View commit details
    Browse the repository at this point in the history
  90. Put big model type fields behind Box (serenity-rs#2205)

    This helps reduce the stack size of most types.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    d1bb161 View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    d4c814f View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    d41b44b View commit details
    Browse the repository at this point in the history
  93. Simplify dispatch (serenity-rs#2203)

    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    8270b9b View commit details
    Browse the repository at this point in the history
  94. Configuration menu
    Copy the full SHA
    f47e202 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    bd2e1e0 View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    c44cb29 View commit details
    Browse the repository at this point in the history
  97. Configuration menu
    Copy the full SHA
    46bd1d7 View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    8f28cc9 View commit details
    Browse the repository at this point in the history
  99. Configuration menu
    Copy the full SHA
    d4e2730 View commit details
    Browse the repository at this point in the history
  100. Fix documentation building

    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    badd0c0 View commit details
    Browse the repository at this point in the history
  101. Configuration menu
    Copy the full SHA
    14d3856 View commit details
    Browse the repository at this point in the history
  102. Add `CacheSettings::{time_to_live, cache_guilds, cache_channels, cach…

    …e_users}` (serenity-rs#2210)
    
    The idea is that even users on resource contrained devices can enable cache
    feature, but just disable all the individual caching flags. What remains is the
    cached fixed-size data: `CachedShardData` and more importantly `CurrentUser`.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    a1e111a View commit details
    Browse the repository at this point in the history
  103. Replace CreateComponents with Vec<CreateActionRow> (serenity-rs#2226

    )
    
    It was just a dumb wrapper around `Vec<CreateActionRow>` anyways.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    1df205b View commit details
    Browse the repository at this point in the history
  104. Configuration menu
    Copy the full SHA
    12706a5 View commit details
    Browse the repository at this point in the history
  105. Configuration menu
    Copy the full SHA
    4795b5c View commit details
    Browse the repository at this point in the history
  106. Configuration menu
    Copy the full SHA
    399792f View commit details
    Browse the repository at this point in the history
  107. Fix documentation building, again

    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    da42665 View commit details
    Browse the repository at this point in the history
  108. Shorten type names (serenity-rs#2232)

    Global find-and-replace:
    - ApplicationCommand -> Command
    - AutoModeration -> AutoMod
    - GuildScheduledEvent -> ScheduledEvent
    - MessageComponent -> Component
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    dec2865 View commit details
    Browse the repository at this point in the history
  109. Fix unused_mut warning (serenity-rs#2242)

    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    7a3ded3 View commit details
    Browse the repository at this point in the history
  110. Configuration menu
    Copy the full SHA
    fd2cf82 View commit details
    Browse the repository at this point in the history
  111. Rename ModalSubmit to Modal (serenity-rs#2234)

    `ModalInteraction` is just as clear as `ModalSubmitInteraction`
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    4ad6c71 View commit details
    Browse the repository at this point in the history
  112. Shorten interaction method names (serenity-rs#2235)

    `create_interaction_response -> `respond`
    `create_followup_message` -> `respond_followup`
    `delete_original_interaction_response` -> `delete_response`
    `delete_followup_message` -> `delete_followup`
    `edit_original_interaction_response` -> `edit_response`
    `edit_followup_message` -> `edit_followup`
    `get_interaction_response` -> `get_response`
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    3299730 View commit details
    Browse the repository at this point in the history
  113. Configuration menu
    Copy the full SHA
    d7523ed View commit details
    Browse the repository at this point in the history
  114. Configuration menu
    Copy the full SHA
    0689d72 View commit details
    Browse the repository at this point in the history
  115. Remove create_autocomplete_response (serenity-rs#2254)

    serenity-rs#2228 changed `CreateAutocompleteResponse` to be a stand-alone response struct
    into just the representation of the `data` response struct field. That's
    because you are supposed to embed it in the `CreateInteractionResponse` enum
    now.
    
    But I forgot that there exists `create_autocomplete_response`, a convenience
    function for `create_response`, which took `CreateAutocompleteResponse`
    directly. After serenity-rs#2228, `create_autocomplete_response` still compiled, but now
    didn't send a proper response to discord but just its `data` field.
    
    This commit removes `create_autocomplete_response` as a temporary fix. For now,
    you should use `create_response` as for any other interaction response.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    1aa198f View commit details
    Browse the repository at this point in the history
  116. Configuration menu
    Copy the full SHA
    0edbb4e View commit details
    Browse the repository at this point in the history
  117. Configuration menu
    Copy the full SHA
    0c5947b View commit details
    Browse the repository at this point in the history
  118. Improve event docs (serenity-rs#2249)

    - Update Discord docs links on event structs
    - Add the required gateway intents to every event
    - On `Cache`, add information which events are used for which cache resource (fixes serenity-rs#1601)
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    a1e5e14 View commit details
    Browse the repository at this point in the history
  119. Remove unstable_discord_api flag from forum channels (serenity-rs#2247

    )
    
    They are officially released now.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    4aeee9b View commit details
    Browse the repository at this point in the history
  120. Configuration menu
    Copy the full SHA
    cb8d6c4 View commit details
    Browse the repository at this point in the history
  121. Configuration menu
    Copy the full SHA
    3410ab7 View commit details
    Browse the repository at this point in the history
  122. Configuration menu
    Copy the full SHA
    cf538a9 View commit details
    Browse the repository at this point in the history
  123. Configuration menu
    Copy the full SHA
    34652d2 View commit details
    Browse the repository at this point in the history
  124. Configuration menu
    Copy the full SHA
    d519948 View commit details
    Browse the repository at this point in the history
  125. Configuration menu
    Copy the full SHA
    4b5fd5e View commit details
    Browse the repository at this point in the history
  126. Rework Framework trait (serenity-rs#2270)

    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    4bd94cb View commit details
    Browse the repository at this point in the history
  127. Configuration menu
    Copy the full SHA
    9dfba93 View commit details
    Browse the repository at this point in the history
  128. Configuration menu
    Copy the full SHA
    8821f37 View commit details
    Browse the repository at this point in the history
  129. Configuration menu
    Copy the full SHA
    3ae4787 View commit details
    Browse the repository at this point in the history
  130. Flatten http module (serenity-rs#2244)

    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    89cdde0 View commit details
    Browse the repository at this point in the history
  131. Configuration menu
    Copy the full SHA
    a38f95a View commit details
    Browse the repository at this point in the history
  132. Configuration menu
    Copy the full SHA
    caa8fd0 View commit details
    Browse the repository at this point in the history
  133. Revert "Rewrite collectors (serenity-rs#2240)"

    This reverts commit c259280.
    
    I presumed it was Github being confused with which changes to show when
    merging the pull request (serenity-rs#2240), but they were real, reverting a few
    commits on `next` as a result.
    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    20242e4 View commit details
    Browse the repository at this point in the history
  134. Configuration menu
    Copy the full SHA
    c3480b1 View commit details
    Browse the repository at this point in the history
  135. Configuration menu
    Copy the full SHA
    0e1fb16 View commit details
    Browse the repository at this point in the history
  136. Make HTTP error more useful (serenity-rs#2277)

    While developing the automod regex PR, I noticed that HTTP errors include lots
    of useless info about the URL, but don't even include the HTTP method
    (POST/GET/PATCH/...). This commit changes that.
    
    Old: `Http(UnsuccessfulRequest(ErrorResponse { status_code: 403, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("discord.com")), port: None, path: "/api/v10/guilds/703332075914264606/auto-moderation/rules", query: None, fragment: None }, error: DiscordJsonError { code: 50001, message: "Missing Access", errors: [] } }))`
    
    New: `Http(UnsuccessfulRequest(ErrorResponse { status_code: 403, url: "https://discord.com/api/v10/guilds/703332075914264606/auto-moderation/rules", method: POST, error: DiscordJsonError { code: 50001, message: "Missing Access", errors: [] } }))`
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    6a0bd7c View commit details
    Browse the repository at this point in the history
  137. Configuration menu
    Copy the full SHA
    16aca38 View commit details
    Browse the repository at this point in the history
  138. Configuration menu
    Copy the full SHA
    2903169 View commit details
    Browse the repository at this point in the history
  139. Configuration menu
    Copy the full SHA
    96b761b View commit details
    Browse the repository at this point in the history
  140. Perform miscellaneous HTTP refactoring (serenity-rs#2285)

    Some small HTTP refactors, mainly getting rid of cruft and moving some things
    around:
    
    1. Instead of having a `ratelimiter_disabled` flag, simply wrap
    `Http::ratelimiter` in `Option`.
    2. Use `HttpBuilder` in `Http::new` instead of duplicating construction logic
    3. Unify `ban` and `ban_with_reason`, and likewise with the kick methods. The
    model methods API remains unchanged.
    4. Introduce a `SecretString` type to prevent leaking the token, e.g. via
    `Debug`.
    5. Change `Http::proxy` to `Option<String>`, because url parsing is already
    done before a request is sent out.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    ccfdd34 View commit details
    Browse the repository at this point in the history
  141. Overhaul HTTP routing (serenity-rs#2288)

    This replaces the combination of `RouteInfo` and `Route` with a single
    `Route` struct, responsible for both the endpoint url and ratelimiting.
    
    A `routes!` macro is introduced to easily generate code for each endpoint.
    
    And `LightMethod` is inlined for each endpoint into the `Request` struct,
    as well as any query parameters.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    03ea246 View commit details
    Browse the repository at this point in the history
  142. Configuration menu
    Copy the full SHA
    4d5ec93 View commit details
    Browse the repository at this point in the history
  143. Configuration menu
    Copy the full SHA
    d4bcc86 View commit details
    Browse the repository at this point in the history
  144. Replace moka cache crate with mini-moka for fewer dependencies (s…

    …erenity-rs#2294)
    
    `mini-moka` provides a cache implementation `mini_moka::sync::Cache`,
    which is a successor of `moka::dash::Cache`. Currently Serenity uses
    `moka::dash::Cache` when `temp_cache` feature is enabled.
    
    `mini_moka::sync::Cache` has the same API and functionality as
    `moka::dash::Cache`, but has fewer external crate dependencies.
    tatsuya6502 authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    7b5c044 View commit details
    Browse the repository at this point in the history
  145. Add call to Framework::init() after client initialisation and add `…

    …ShardManager::intents()` (serenity-rs#2295)
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    f92593e View commit details
    Browse the repository at this point in the history
  146. Configuration menu
    Copy the full SHA
    f1b9b7f View commit details
    Browse the repository at this point in the history
  147. Fix dispatching of guild scheduled events (serenity-rs#2307)

    This renames types related to schedule events back the way they were before
    commit ea8651, which fixes dispatch as events are serialised/deserialised
    based on their names.
    marcantoinem authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    2a58a54 View commit details
    Browse the repository at this point in the history
  148. Configuration menu
    Copy the full SHA
    bc88089 View commit details
    Browse the repository at this point in the history
  149. Make collector API backwards compatible (serenity-rs#2309)

    By:
    - renaming foo_collector back to await_foo and await_foos
    - adding IntoFuture impl on collector types
    - and a deprecated `.build()` method that just redirects to `.stream()`
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    4e07936 View commit details
    Browse the repository at this point in the history
  150. Configuration menu
    Copy the full SHA
    f422fa2 View commit details
    Browse the repository at this point in the history
  151. Configuration menu
    Copy the full SHA
    8b13397 View commit details
    Browse the repository at this point in the history
  152. Configuration menu
    Copy the full SHA
    df07d57 View commit details
    Browse the repository at this point in the history
  153. Configuration menu
    Copy the full SHA
    0fa84d6 View commit details
    Browse the repository at this point in the history
  154. Configuration menu
    Copy the full SHA
    0e96536 View commit details
    Browse the repository at this point in the history
  155. Configuration menu
    Copy the full SHA
    c973bdf View commit details
    Browse the repository at this point in the history
  156. Alter serenity::Result to be a Result<T, E> alias where E is `s…

    …erenity::Error` by default (serenity-rs#2326)
    alakhpc authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    e81134c View commit details
    Browse the repository at this point in the history
  157. Configuration menu
    Copy the full SHA
    a5d5b80 View commit details
    Browse the repository at this point in the history
  158. Configuration menu
    Copy the full SHA
    d68c7c1 View commit details
    Browse the repository at this point in the history
  159. Configuration menu
    Copy the full SHA
    d2501b2 View commit details
    Browse the repository at this point in the history
  160. Configuration menu
    Copy the full SHA
    f80b62e View commit details
    Browse the repository at this point in the history
  161. Fix is_new flag being inverted

    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    fb7adc8 View commit details
    Browse the repository at this point in the history
  162. Configuration menu
    Copy the full SHA
    ea948e8 View commit details
    Browse the repository at this point in the history
  163. Configuration menu
    Copy the full SHA
    e5a4be8 View commit details
    Browse the repository at this point in the history
  164. Upgrade dependencies (serenity-rs#2353)

    Update Serenity's dependencies to the latest major versions.
    
    This requires a breaking change to the signature of `serenity::json::from_str`.
    This is to ensure the soundness of calling `simd_json::from_str`, which is
    unsafe, in that it might modify the underlying string such that it no longer
    contains valid UTF-8. So, if our wrapper function takes ownership of the
    buffer, it will be dropped at the end of the function, guaranteeing that
    invalid UTF-8 cannot be used afterward.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    007a439 View commit details
    Browse the repository at this point in the history
  165. Configuration menu
    Copy the full SHA
    d91284d View commit details
    Browse the repository at this point in the history
  166. Add support for creating forum posts (serenity-rs#2357)

    This adds a new builder `CreateForumPost`, and adds relevant methods `{Http,
    ChannelId, GuildChannel}::create_forum_post`.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    8d51294 View commit details
    Browse the repository at this point in the history
  167. Remove redundant ChannelId in CreateStageInstance builder (sereni…

    …ty-rs#2360)
    
    Change the `channel_id` parameter to be required only at execution time.
    However, since the payload must also include a `channel_id` field, make the
    field an `Option<ChannelId>` and fill it in at execution time.
    
    This also adds support for the `send_start_notification` field.
    
    Breaking changes:
    
    - Remove `CreateStageInstance::channel_id`.
    - Remove the `channel_id` parameter of `CreateStageInstance::new`.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    7ad6dde View commit details
    Browse the repository at this point in the history
  168. Configuration menu
    Copy the full SHA
    bf2d347 View commit details
    Browse the repository at this point in the history
  169. Add CreateThread::invitable (serenity-rs#2359)

    This is only relevant for private threads.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    fa80c84 View commit details
    Browse the repository at this point in the history
  170. Configuration menu
    Copy the full SHA
    386fc01 View commit details
    Browse the repository at this point in the history
  171. Configuration menu
    Copy the full SHA
    1c31f96 View commit details
    Browse the repository at this point in the history
  172. Configuration menu
    Copy the full SHA
    ea1bc6d View commit details
    Browse the repository at this point in the history
  173. Configuration menu
    Copy the full SHA
    269c5f5 View commit details
    Browse the repository at this point in the history
  174. Configuration menu
    Copy the full SHA
    04f69ec View commit details
    Browse the repository at this point in the history
  175. Re-export Colour and its Color alias into the serenity::model m…

    …odule (serenity-rs#2371)
    
    This also makes `GatewayIntents::auto_moderation_{configuration, execution}` const.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    7b775da View commit details
    Browse the repository at this point in the history
  176. Fix breaking changes (serenity-rs#2356)

    - Add back `Default` impl for `PresenceUser`
    - Add back removed `Cache` methods
    - Add back `Channel::category`
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    115895c View commit details
    Browse the repository at this point in the history
  177. Configuration menu
    Copy the full SHA
    154cfe4 View commit details
    Browse the repository at this point in the history
  178. Configuration menu
    Copy the full SHA
    cdf6005 View commit details
    Browse the repository at this point in the history
  179. Prevent double slashes with HTTP proxy (serenity-rs#2377)

    Fixes serenity-rs#2322
    
    Probably wouldn't have caused because double slashes are treated by HTTP
    servers as single slashes in my experience.
    
    After a bit of back and forth I opted not to use reqwest methods. Parsing the
    given proxy in `HttpBuilder` into an `Url` directly means the builder method
    returns `Result` (or panics) which is both ugly. Also, `Url`'s methods yield the
    scheme and domain both as `&str`, so we would still just have a string in the
    internal proxy field instead of a type-safe value. So I kept the current simple
    solution that gets the job done and just added the fix.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    65a7214 View commit details
    Browse the repository at this point in the history
  180. Remove ShardManagerMonitor and other gateway cleanup (serenity-rs#2372

    )
    
    The bulk of this commit is removing `ShardManagerMonitor`. It was just a
    background task that received `ShardManagerMessage`'s and called the respective
    `ShardManager` function. Now, you can just call the respective `ShardManager`
    function directly.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    c09eca4 View commit details
    Browse the repository at this point in the history
  181. Configuration menu
    Copy the full SHA
    1e6ed8a View commit details
    Browse the repository at this point in the history
  182. Configuration menu
    Copy the full SHA
    f55f388 View commit details
    Browse the repository at this point in the history
  183. Rename application_command to command everywhere (serenity-rs#2358)

    Except for permission names to avoid an inconsistent deviation from Discord's permission specifiers.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    5b6493a View commit details
    Browse the repository at this point in the history
  184. Remove related ID infrastructure (serenity-rs#2384)

    It's a really bad way to extract data from an event and it was only used for `EventCollector`, which has been superseded by the strongly typed generic `collector` function, where you can just extract event data straightforwardly with a match instead of unwrapping related IDs.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    e365475 View commit details
    Browse the repository at this point in the history
  185. Configuration menu
    Copy the full SHA
    cdacad9 View commit details
    Browse the repository at this point in the history
  186. Configuration menu
    Copy the full SHA
    d530102 View commit details
    Browse the repository at this point in the history
  187. Register collectors via shared mutex instead of channel (serenity-rs#…

    …2388)
    
    Breaking changes:
    
    - `ShardMessenger::new` is not `const` anymore
        - the required argument wasn't obtainable in a const context anyway
    - `ShardMessenger::new` takes a `&ShardRunner` instead of a `Sender<ShardRunnerMessage>` now
    - `ShardRunnerMessage::AddCollector` was removed
        - to add a collector manually, use `ShardMessenger::add_collector` instead
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    27232d8 View commit details
    Browse the repository at this point in the history
  188. Slightly clean up ShardRunner loop (serenity-rs#2387)

    Breaking changes:
    - `ShardManager`:
        - `shard_update` method renamed to `update_shard_latency_and_stage`
    - `Shard`:
        - `heartbeat_instants` method removed in favor of the more specific `last_heartbeat_sent` and `last_heartbeat_ack`
        - `last_heartbeat_sent` and `last_heartbeat_ack` return type changed from `Option<&Instant>` to `Option<Instant>`
        - `heartbeat_interval` return type changed from `Option<&u64>` to `Option<Duration>`
        - `check_heartbeat` method renamed to `do_heartbeat`
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    adde418 View commit details
    Browse the repository at this point in the history
  189. Configuration menu
    Copy the full SHA
    e9e89dd View commit details
    Browse the repository at this point in the history
  190. Implement voice messages (serenity-rs#2392)

    No breaking changes.
    
    Newly added:
    - `Attachment` fields: `duration_secs`, `waveform`
    - `MessageFlags` bitflag: `IS_VOICE_MESSAGE`
    - `model::Error` variant: `CannotEditVoiceMessage`
    - `Permissions` bitflag: `SEND_VOICE_MESSAGES`
    
    discord/discord-api-docs#6082
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    67ccb09 View commit details
    Browse the repository at this point in the history
  191. Configuration menu
    Copy the full SHA
    822136c View commit details
    Browse the repository at this point in the history
  192. Configuration menu
    Copy the full SHA
    a603578 View commit details
    Browse the repository at this point in the history
  193. Synchronise model structs/enums (serenity-rs#2393)

    * Add Connection::two_way_link
    
    * Remove non-existent VoiceServerUpdateEvent::channel_id
    
    * Make CurrentUser a type alias to User
    
    CurrentUser had a bunch of fields missing, and CurrentUser and User are the same type in Discord docs (it's both just User Object)
    
    * Note that MessageApplication is an undocumented subset
    
    * Add 3 fields on StageInstance
    
    StageInstance::[privacy_level, discoverable_enabled, guild_scheduled_event_id].
    
    Also added StageInstancePrivacyLevel as a new type
    
    * Fix copy-paste error in DefaultReaction Discord docs link
    
    * Add GuildPreview::stickers
    
    * Add Integration::scopes and sort fields
    
    * Add Member::flags and new GuildMemberFlags type
    
    And sort fields
    
    * Add ThreadMember::[member, guild_id]
    
    * Add 2 ScheduledEvent fields and a new type
    
    Fields: ScheduledEvent::[privacy_level, entity_id]
    New type: ScheduledEventPrivacyLevel
    
    * Add 5 AuditLogs fields and new PartialIntegration type
    
    Fields: AuditLogs::[auto_moderation_rules, application_commands, guild_scheduled_events, integrations, threads]
    
    * Note for later to rename Rule to AutomodRule
    
    * Add ChunkGuildMessage::presences
    
    * Add PartialChannel::[thread_metadata, parent_id]
    
    * Make FollowedChannel's fields actually public (lol)
    
    * Sort Reaction fields
    
    * Change GuildUpdateEvent::guild type to Guild
    
    * Presence: remove redundant serde-default's and sort fields
    
    And unwrap `guild_id` field (`Option<GuildId>` -> `GuildId`)
    
    The `#[serde(default)]` were redundant because the fields are required according to Discord docs, and I couldn't find any place in the codebase that relies on them being optional
    
    * Remove redundant CurrentUser methods
    
    avatar_url, default_avatar_url, face, static_avatar, and tag already have implementations on User (which CurrentUser is now a type alias to)
    guilds, invite_url, and invite_url_with_oauth2_scopes didn't have much to do with CurrentUser and didn't even access any field of it
    
    * Add 2 GuildChannel fields and new type
    
    New fields: permissions, default_forum_layout
    New type: ForumLayoutType
    
    * Add MessageReference::fail_if_not_exists
    
    * Add 2 Message fields and a new type
    
    New fields: position, role_subscription_data
    New type: RoleSubscriptionData
    
    * Add new MessageType's
    
    RoleSubscriptionPurchase, InteractionPremiumUpsell, StageStart, StageEnd, StageSpeaker, StageTopic, GuildApplicationPremiumSubscription
    
    * Include Discord doc text in ChunkGuildFilter
    
    * Remake MessageUpdateEvent
    
    By going off Message as the base state, and then commenting out the fields that aren't editable, wrapping the rest in Option, and making the corresponding CacheUpdate implementation
    
    * Note in PresenceUser docs that it should base off User
    
    * Remosed unused InterimMember
    
    * Add Discord docs link for extra Member fields
    
    * Add GuildMembersChunkEvent::[not_found, presences]
    
    And integrate Discord docs text
    
    * Add 5 new InviteCreateEvent fields
    
    And integrate Discord docs text
    
    New fields: created_at, target_type, target_user, target_application, uses
    
    * Add note about Discord schemas to ReactionRemoveEvent
    
    * Use Debug derive for VoiceServerUpdateEvent
    
    Previously it just reimplemented the derive
    
    * Add required permission to GuildAuditLogEntryCreateEvent docs
    
    * Sort ReactionRemoveAllEvent fields
    
    * Add TypingStartEvent::member and sort fields
    
    And integrate Discord doc text
    
    * Change UserUpdateEvent::current_user type to User
    
    And integrate Discord docs text
    
    * Remove non-existent ResumedEvent::trace field
    
    * Fix ThreadListSyncEvent::channel_ids field typo
    
    * Fix ThreadMembersUpdateEvent::removed_member_ids field typo
    
    * Sort GuildScheduledEventUser[Add, Remove]Event fields
    
    * Add Activity::created_at
    
    And remove redundant #[serde(default)] on the kind/type
    
    * Fix PresenceUser Discord docs link
    
    * Remove 2 Ready fields, add 2
    
    Removed presences, private_channels, trac
    Added resume_gateway_url
    And sorted the fields
    
    * Add Invite::scheduled_event
    
    * Update InviteGuild
    
    * ADDENDUM update InviteGuild
    
    * Make InviteStageInstance fields pub
    
    * Added 7 new User fields and a new type
    
    New fields: system, mfa_enabled, locale, verified, email, flags, premium_type
    New type: PremiumType
    And sorted User fields
    
    * Remove non-existent VoiceState::token field
    
    * Add 4 Webhook fields
    
    New fields: application_id, source_guild, source_channel, url
    And sorted fields
    
    * Add Command::nsfw
    
    * Add CurrentApplicationInfo::role_connections_verification_url
    
    * Add Attachment::description
    
    waveform and duration_secs are still missing; they're coming with serenity-rs#2392
    
    * Fix Reaction::member field type
    
    * Update TriggerMetadata fields and make them pub
    
    * Update Trigger
    
    Adds allow_list field to Trigger::Keyword
    Changes KeywordPreset from tuple variant to struct variant and adds allow_list field
    Adds Trigger::MentionSpam
    Removes Trigger::HarmfulLink (doesn't exist anymore in Discord docs, it's presumably deleted)
    Removes the internal InterimTriggerMetadata in favor of TriggerMetadata (they modeled the same fields, just with negliglible ownership difference).
    
    * Fix Integration struct
    
    Fixes expire_behavior typo and makes the guild_id optional because it's only sent sometimes
    
    * Add more documentation to PartialMember
    
    * Add more documentation to ThreadMember
    
    * Sort Guild fields and 5 new fields
    
    New fields: unavailable, scheduled_events, premium_progress_bar_enabled, max_stage_video_channel_users, icon_hash
    
    * Add GuildInfo::features and sort fields
    
    * Update PartialGuild by basing off Guild
    
    * Add 3 RoleTags fields
    
    New fields: subscription_listing_id, available_for_purchase, guild_connections
    
    * Add 2 Permissions flags
    
    VIEW_CREATOR_MONETIZATION_ANALYTICS and USE_SOUNDBOARD
    
    * Update ApplicationFlags flags
    
    Incorporated Discord doc text
    Added APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE and APPLICATION_COMMAND_BADGE
    Fixed bitflag integers for VERIFICATION_PENDING_GUILD_LIMIT, EMBEDDED, GATEWAY_MESSAGE_CONTENT, GATEWAY_MESSAGE_CONTENT_LIMITED
    
    * Add 2 SystemChannelFlags flags
    
    SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS and SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES
    
    * Note deliberately omitted `summary` field in CurrentApplicationInfo
    
    * Sort BotGateway fields
    
    * Add channel field to [Command, Component, Modal]Interaction
    
    * Remove InviteTargetType::Normal and fix EmmbeddedApplication typo
    
    * Add StickerFormatType::Gif
    
    * Improve some docs
    
    * Add Scope::RoleConnectionsWrite and fix RelactionshipsRead typo
    
    * Add ChannelType::GroupDm
    
    Bots don't support group DMs but it's still important to support in serenity for OAuth2 discord/discord-api-docs#426
    
    * Fix SortOrder::CreationData wrong enum value
    
    * Add AutoModAction::[FlagToChannel, UserCommunicationDisabled]
    
    * Add Action::BlockMessage::custom_message
    
    * Update Discord status page related schemas
    
    * Add some Discord docs link (no field changes required)
    
    * Update SelectMenu and SelectMenuOption
    
    Added Discord docs links
    Added SelectMenu::[channel_types, disabled]
    Removed SelectMenu::values (this was from the time Discord accidentally deployed select menu support in modals. But they yanked it, and it wasn't documented anyways)
    
    * Update InputText
    
    It was completely out-of-date. CreateInputText duplicated all of its fields, and only CreateInputText was kept up-to-date. I made CreateInputText use InputText internally now, to keep up-to-date and not have duplicated fields
    
    Added InputText::{style, label, min_length, max_length, required, placeholder}.
    Changed InputText::value type from String to Option<String> - that's what it says in the Discord docs, and the field needs to be optional anyways now to be usable within CreateInputText
    
    * Fix three wrong field types marked by TODOs
    
    * Make MessageUpdateEvent's update code available publically
    
    This is useful for e.g. poise, which previously had to reimplement it https://github.com/serenity-rs/poise/blob/77e4d3a4897657c91c743f5b45a5d8975b0a778d/src/track_edits.rs#L7-L48
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    721ebcb View commit details
    Browse the repository at this point in the history
  194. Configuration menu
    Copy the full SHA
    dd1571b View commit details
    Browse the repository at this point in the history
  195. Configuration menu
    Copy the full SHA
    a1122d3 View commit details
    Browse the repository at this point in the history
  196. Fix missing field "waveform" error (serenity-rs#2402)

    This was overlooked due to an annoying serde-derive footgun: serde-rs/serde#2249 (comment)
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    5a20918 View commit details
    Browse the repository at this point in the history
  197. Update CI (serenity-rs#2404)

    This moves to a new toolchain action, uses a new caching action and fixes the Windows CI failing.
    Milo123459 authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    47674d9 View commit details
    Browse the repository at this point in the history
  198. Fix shutdown (serenity-rs#2400)

    Previous execution path of ShardManager::shutdown:
    
    ```
    ShardManager::shutdown()
    sends ShardQueuerMessage::ShutdownShard to ShardQueuer::run()
    calls ShardQueuer::shutdown()
    sends ShardRunnerMessage::Shutdown to ShardRunner::recv()
    calls ShardRunner::handle_rx_value()
    calls ShardRunner::checked_shutdown()
    calls ShardManager::shutdown_finished()
    sends ACK to ShardManager::shutdown(), which can now finally return
    ```
    
    New execution path:
    
    ```
    ShardManager::shutdown()
    calls Shard::shutdown()
    ```
    
    To do that, ShardManager needed direct access to the Shard instance (instead of only sending messages to ShardRunner). So I added a `shard: Arc<Mutex<Shard>>` field to `ShardRunnerInfo` (`ShardManager` contains a `runners: Arc<Mutex<HashMap<ShardId, ShardRunnerInfo>>>`). This also meant ShardRunner couldn't own the Shard directly anymore but needed to store an `Arc<Mutex<Shard>>` too and lock it when needed. This makes for a bit of an ugly diff in shard_runner.rs but oh well.
    
    After this, I removed shutdown related functions from ShardRunner and ShardQueuer (and the corresponding enum variants from ShardRunnerMessage and ShardQueuerMessage). Instead there's now just a single simple `shutdown` function on `Shard`, which is called directly by `ShardManager`.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    f63e1a4 View commit details
    Browse the repository at this point in the history
  199. Fix deserialisation of Presence

    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    7edba3b View commit details
    Browse the repository at this point in the history
  200. Configuration menu
    Copy the full SHA
    c717aba View commit details
    Browse the repository at this point in the history
  201. Fix deserialisation of SelectMenu

    arqunis authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    7dfb60d View commit details
    Browse the repository at this point in the history
  202. Move CreateQuickModal to utils (serenity-rs#2374)

    All other builder types in that module belong to an HTTP request and clearly represent that request's fields as per Discord documentation. `CreateQuickModal` doesn't; it's an arbitrary abstraction on top of multiple HTTP requests (and gateway events, violating the pattern that the builder module doesn't have anything to do with gateway). This kind of feature fits better in the `utils` module.
    
    This also opens the possibility to add `serde::Serialize + serde::Deserialize` bounds to the `Builder` trait (cc serenity-rs#2337).
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    74d790f View commit details
    Browse the repository at this point in the history
  203. Revert "Implement Deserialize for several types used in the `create…

    …_components` builder (serenity-rs#2335)" (serenity-rs#2413)
    
    This reverts commit 851ddc4.
    
    The decision to add `Deserialize` impls for all builders has been pushed
    back to be made only after the 0.12 release. Considering this commit was
    a partial implementation (only for `CreateComponents`), keeping it would
    be inconsistent.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    c890301 View commit details
    Browse the repository at this point in the history
  204. Configuration menu
    Copy the full SHA
    7268c75 View commit details
    Browse the repository at this point in the history
  205. Configuration menu
    Copy the full SHA
    74ef227 View commit details
    Browse the repository at this point in the history
  206. Change CurrentUser to a newtype around User. (serenity-rs#2418)

    This removes the unintentionally-exposed `User::edit`, which was
    confusing. The `edit` function can now only be called on `CurrentUser`,
    which upholds the requirement that a user can only edit their own
    profile.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    c6fcf1d View commit details
    Browse the repository at this point in the history
  207. Do not feature gate MessageUpdateEvent::apply_to_message under `cac…

    …he` (serenity-rs#2422)
    
    This is used in poise and it should be useful even when `cache` is disabled.
    fee1-dead authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    579bf82 View commit details
    Browse the repository at this point in the history
  208. Remove FromStrAndCache and StrExt (serenity-rs#2424)

    `FromStrAndCache` is like `ArgumentConvert` but worse (was only implemented for `Channel` and `Role`, supported only cache retrieval and no on-demand async requests, and it had no access to the channel ID and guild ID it was called in).
    
    `StrExt` was a simple extension trait with a single `parse_cached()` method that called out to `FromStrAndCache`.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    bb433c0 View commit details
    Browse the repository at this point in the history
  209. Make InputText::{label, style} optional (serenity-rs#2423)

    Discord says they are required, implied for both send and receive direction, but they're only required for sending. When receiving, they are apparently missing.
    
    discord/discord-api-docs#6141
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    41f1231 View commit details
    Browse the repository at this point in the history
  210. Fix caching of updates to channels and clean up permission calculatio…

    …n a bit (serenity-rs#2428)
    
    A few things:
    - Rewrite `user_permissions_in`
    - Change `ModelError::InvalidPermissions` fields from `(Permissions)` to `{ required: Permissions, present: Permissions }`
    - Deprecate `role_permissions_in`/`permissions_for_role`
    - Change `has_perms` to `require_perms` and reduce boilerplate
    - Implement `member_permissions` in terms of `_user_permissions_in` (de-duplicate permission calculation code)
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    ee6aef4 View commit details
    Browse the repository at this point in the history
  211. Configuration menu
    Copy the full SHA
    89c7c6f View commit details
    Browse the repository at this point in the history
  212. Sync builders with Discord API (serenity-rs#2425)

    * Add a bunch of CreateChannel fields
    
    * Add a bunch of EditChannel fields
    
    * Make CreateEmbed{Author, Footer} into newtypes
    
    * Add CreateCommand::nsfw and sort fields
    
    * CreateInteractionResponseFollowup
    
    Sort fields and remove username and avatar_url because those are only supported in webhooks
    
    * Make EditInteractionResponse newtype over EditWebhookMessage
    
    Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate
    
    * Make AutocompleteChoice alias to CommandOptionChoice
    
    They're same according to Discord
    
    * Add CreateMessage::nonce
    
    * Sort CreateScheduledEvent fields
    
    * Add CreateStageInstance::privacy_level
    
    * CreateSticker: remove optional fields from constructor
    
    * Make CreateGuildWelcomeChannel newtype
    
    * Add EditGuild::premium_progress_bar_enabled
    
    * Add EditMember::flags
    
    * Add EditScheduledEvent::privacy_level
    
    * Add EditStageInstance::privacy_level
    
    * Add EditThread::{rate_limit_per_user, flags}
    
    * Add ExecuteWebhook::thread_name
    
    * Fix WebhookIncomming misspelling
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    f822b90 View commit details
    Browse the repository at this point in the history
  213. Clean up serenity::model::prelude (serenity-rs#2429)

    Cleans up the model prelude by removing some re-exports, namely:
    
    - Don't re-export all the submodules of `model`
    - Don't re-export 3rd party types that are only used internally
    - Define the `Color` type alias in `model::colour`
    - Clean up collisions around `automod::EventType` by not glob-exporting from `guild::automod::*`
    
    Note that `guild::audit_log` and `guild::automod` still end up getting re-exported via `guild::*`, but I'm not sure how to address that without manually re-exporting each type from `guild`, which would be annoying.
    mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    df54f98 View commit details
    Browse the repository at this point in the history
  214. Configuration menu
    Copy the full SHA
    0b4f7fd View commit details
    Browse the repository at this point in the history
  215. Configuration menu
    Copy the full SHA
    8958cce View commit details
    Browse the repository at this point in the history
  216. Configuration menu
    Copy the full SHA
    80b445a View commit details
    Browse the repository at this point in the history
  217. Configuration menu
    Copy the full SHA
    6d17691 View commit details
    Browse the repository at this point in the history
  218. Configuration menu
    Copy the full SHA
    aa948cb View commit details
    Browse the repository at this point in the history
  219. Include all Message fields in MessageUpdateEvent (serenity-rs#2443)

    I previously had commented some out in 
    https://github.com/serenity-rs/serenity/pull/2393/files#diff-ae030146ad938ad8598138dec5f70cd4a4d3df75907295fc933f3d281a54430dL423-L448 
    because they cannot change in message update events. But unbeknownst to me, Discord doesn't send only the changed fields, but it sends some fields even when they didn't change.
    
    The safer thing is to have just every single field of `Message`'s fields also in `MessageUpdateEvent`.
    kangalio authored and mkrasnitski committed May 30, 2023
    Configuration menu
    Copy the full SHA
    b4121b4 View commit details
    Browse the repository at this point in the history
  220. Configuration menu
    Copy the full SHA
    7761a2f View commit details
    Browse the repository at this point in the history
  221. Configuration menu
    Copy the full SHA
    296886b View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

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

Commits on Jun 3, 2023

  1. Configuration menu
    Copy the full SHA
    d3dab34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14e65e3 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

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

Commits on Jun 12, 2023

  1. Configuration menu
    Copy the full SHA
    19166de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    528ca91 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bed34b6 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

  1. Add dedicated type for storing image hashes (serenity-rs#2462)

    This converts the hex representation that is used across the API into a much smaller (56 vs 17) type which improves type safety, saves space, and reduces heap allocations (only during a clone).
    GnomedDev authored Jun 13, 2023
    Configuration menu
    Copy the full SHA
    9ea3660 View commit details
    Browse the repository at this point in the history
  2. Implement passing thread_id for Webhook::edit_message, `Webhook::…

    …delete_message`, and `Webhook::get_message`. (serenity-rs#2465)
    Ruthenic authored Jun 13, 2023
    Configuration menu
    Copy the full SHA
    7f31a63 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Add global username (serenity-rs#2461)

    oSumAtrIX authored and arqunis committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    1e4797a View commit details
    Browse the repository at this point in the history
  2. Optimise size of model structs (serenity-rs#2464)

    This commit reduces the sizes of many integer fields, or converts data to enums when appropriate:
    
    - Reduce the size of rate_limit fields
    - Reduce the size of channel position
    - Reduce size of role position
    - Use an enum for `auto_archive_duration`
    - `DefaultReaction` -> `ForumEmoji`
    - Swap `AfkTimeout` for enum
    - Reduce `Sticker::sort_value` to u16
    - Reduce size of `min`/`max_values`
    - Reduce size of `max_uses` and `max_age`
    - Reduce size of `ActivityParty::size`
    - Reduce size of `Ready::version`
    - Reduce `InputText::min/max_length`
    - Reduce `size`/`width`/`height` -- Discord filesize limits mean we won't hit the size limit, and therefore won't hit height/width limits, plus discord rejects 0 sized files so we can use `NonZero*`
    - Reduce size of `mention_total_limit`
    - Reduce size of `RoleSubscriptionData::total_months_subscribed` -- This gives us ~5000 years of role subscription
    - Fix Change sizes
    GnomedDev authored Jun 16, 2023
    Configuration menu
    Copy the full SHA
    2bb56ba View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2023

  1. Skip parsing attributes from rustfmt or clippy (serenity-rs#2473)

    This alters attribute parse code in `command_attr` to not parse attributes like `#[rustfmt::skip]` as its own, and instead should emit them in the output of the macros.
    arqunis authored Jun 23, 2023
    Configuration menu
    Copy the full SHA
    16bfbe2 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2023

  1. Configuration menu
    Copy the full SHA
    755f07c View commit details
    Browse the repository at this point in the history
  2. Deserialize to arrayvec::ArrayString instead of String for `Image…

    …Hash` (serenity-rs#2467)
    
    This saves an allocation on creation of `ImageHash`.
    GnomedDev authored Jun 24, 2023
    Configuration menu
    Copy the full SHA
    4145d84 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2023

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

Commits on Jun 27, 2023

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

Commits on Jul 6, 2023

  1. Configuration menu
    Copy the full SHA
    c8c39cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77b9e33 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb95c39 View commit details
    Browse the repository at this point in the history
  4. Revert "Fix shutdown (serenity-rs#2400)"

    This reverts commit f63e1a4.
    mkrasnitski authored and arqunis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    c6fe6f6 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

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

Commits on Jul 19, 2023

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

Commits on Jul 21, 2023

  1. Fix compilation with just the http and builder features enabled (s…

    …erenity-rs#2496)
    
    Untangles dependencies on the `model` and `utils` feature from the
    `http` feature, allowing compilation without them.
    mkrasnitski authored Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6ac57a0 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Add support for setting custom activity status (serenity-rs#2503)

    This allows custom statuses to be used. See: discord/discord-api-docs#6345
    tazz4843 authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    4bb5d95 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. Initial prototype SQLx encode/decode support

    Currently only supports IDs,
    might expand to guilds/users/etc as a utility in the future,
    depending on PR feedback.
    tazz4843 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    e1f2f3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29e8ff0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6cdf0c6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3a478a3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ebd8a30 View commit details
    Browse the repository at this point in the history