-
Notifications
You must be signed in to change notification settings - Fork 563
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
Add support for sticker packs, guild stickers, sticker routes #1395
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes the `Box` around the framework, allowing to `as`-cast for the `ClientBuilder::framework_arc` method. The `as`-cast is now performed in the method itself, accepting a generic framework instead, easing the use of the API.
This adds support for parsing json with the `simd-json` crate for increased performance. However, it must be enabled with the `simd-json` feature flag, as not all processors support all SIMD instructions. In addition, the minimum-supported Rust version has been increased to 1.49.
…#1344) Closes serenity-rs#876. The dispatch error hook now receives a fourth parameter with the command name.
This commit makes it possible to add new attachments to a message when editing it. This commit: - creates a new method `Http::edit_message_and_attachments` (that method is to `edit_message` what `send_files` is to `send_message`); - there's a lot of duplication between that new method and `Http::edit_message_and_attachments` and `Http::send_files`, but I don't know enough about serenity's http design to improve the situation; - changes calls of `Http::edit_message` to `Http::edit_message_and_attachments` where appropriate; - creates a new method `EditMessage::attachment` to add a new attachment; - adds a new field to `EditMessage` which stores new attachments (breaking change); - adds a lifetime parameter to `EditMessage` (breaking change); - moves the `AttachmentType` serialization into an HTTP form part into a function to avoid code duplication.
Prevents changing embed colours to black when editing a message. When an embed colour isn't provided when creating a message, the API returns messages with colour as undefined for default colour. The colour field has the `#[serde(default)]` attribute, which changes that into a `0` instead.
drklee3
added
discord feature
Related to Discord's functionality.
model
Related to the `model` module.
http
Related to the `http` module.
labels
Jun 17, 2021
HarmoGlace
reviewed
Jun 26, 2021
…ty-rs#1412) This changes the return type of the default help commands from `Option` to `Result` to allow the caller to decide how they want to present the error that occurred when sending the response.
This deserializes `Guild` channels from `GuildCreate` as the `Channel` enum instead of `GuildChannel`. This also prevents the merging of guild channels and categories in `Cache::channels` when they should be separate. This also correctly updates the guild channels in the cache (e.g. when using `Message::guild(ctx)`) instead of *only* `Cache::categories`. Additionally, this is a breaking change as `Guild::channels` has been changed from `HashMap<ChannelId, GuildChannel>` to `HashMap<ChannelId, Channel>`.
This commit removes the `Shard::shutdown` field and the `Shard::is_shutdown` method. The method always returned false as `Shard::shutdown` was never modified anywhere, which left the method useless.
…nity-rs#1416) This adds a Cargo configuration file that defines flags for every invocation of `rustc` on Serenity and its dependencies. This removes the need to explicitly specify those flags when building the library, especially when testing `simd-json` code. Fixes serenity-rs#1415
HarmoGlace
suggested changes
Jun 30, 2021
HarmoGlace
suggested changes
Jul 1, 2021
This bakes multipart forms into `Request`s when making HTTP calls to Discord's API for sending attachments. As a result, this standardises the behaviour for endpoints that allow you to send attachments to use the same ratelimiting code as every other endpoint, rather than those endpoints performing raw requests and bypassing the ratelimiter. Fixes serenity-rs#1269
drklee3
added
command_attr
Related to the `command_attr` crate.
utils
Related to the `utils` module.
labels
Jul 5, 2021
arqunis
added a commit
to arqunis/serenity
that referenced
this pull request
Jul 10, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
This has been manually merged: 744bc13. |
arqunis
added a commit
to arqunis/serenity
that referenced
this pull request
Jul 11, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Jul 11, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Aug 9, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Sep 8, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Sep 25, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Sep 30, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Oct 29, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Nov 15, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Nov 15, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Dec 22, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Dec 23, 2021
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Jan 23, 2022
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Mar 1, 2022
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Mar 15, 2022
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Apr 2, 2022
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
arqunis
pushed a commit
to arqunis/serenity
that referenced
this pull request
Apr 18, 2022
…renity-rs#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
builder
Related to the `builder` module.
client
Related to the `client` module.
command_attr
Related to the `command_attr` crate.
discord feature
Related to Discord's functionality.
http
Related to the `http` module.
model
Related to the `model` module.
utils
Related to the `utils` module.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds the following features:
Breaking change as sticker module is moved out of the channel module and to the root model module.
This also adds an additional
mime
andmime_guess
dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used byreqwest
internally.Relevant documentation:
sticker_items
discord/discord-api-docs#3171Tested