improve existing documentation

This commit is contained in:
bitfl0wer 2023-06-04 14:32:57 +02:00
parent 213220c8e0
commit fd2b9e670f
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 13 additions and 10 deletions

View File

@ -16,16 +16,19 @@ pub struct ReactionMeta {
impl ReactionMeta { impl ReactionMeta {
/** /**
Deletes all reactions for a message. Deletes all reactions for a message.
# Arguments This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user.
* `user` - A mutable reference to a [`UserMeta`] instance.
# Returns # Arguments
A `Result` containing a [`reqwest::Response`] or a [`crate::errors::InstanceServerError`]. * `user` - A mutable reference to a [`UserMeta`] instance.
# Returns
A `Result` containing a [`reqwest::Response`] or a [`crate::errors::InstanceServerError`].
Fires a `Message Reaction Remove All` Gateway event.
# Reference # Reference
See [https://discord.com/developers/docs/resources/channel#delete-all-reactions](https://discord.com/developers/docs/resources/channel#delete-all-reactions) See [https://discord.com/developers/docs/resources/channel#delete-all-reactions](https://discord.com/developers/docs/resources/channel#delete-all-reactions)
*/ */
pub async fn delete_all( pub async fn delete_all(
&self, &self,
user: &mut UserMeta, user: &mut UserMeta,
@ -91,8 +94,7 @@ impl ReactionMeta {
/** /**
Deletes all the reactions for a given `emoji` on a message. This endpoint requires the Deletes all the reactions for a given `emoji` on a message. This endpoint requires the
MANAGE_MESSAGES permission to be present on the current user. Fires a `Message Reaction MANAGE_MESSAGES permission to be present on the current user.
Remove Emoji` Gateway event.
# Arguments # Arguments
* `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or * `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
@ -102,6 +104,7 @@ impl ReactionMeta {
# Returns # Returns
A `Result` containing a [`reqwest::Response`] or a [`crate::errors::InstanceServerError`]. A `Result` containing a [`reqwest::Response`] or a [`crate::errors::InstanceServerError`].
Fires a `Message Reaction Remove Emoji` Gateway event.
# Reference # Reference
See [https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji](https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji) See [https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji](https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji)
@ -137,8 +140,7 @@ impl ReactionMeta {
This endpoint requires the READ_MESSAGE_HISTORY permission This endpoint requires the READ_MESSAGE_HISTORY permission
to be present on the current user. Additionally, if nobody else has reacted to the message using to be present on the current user. Additionally, if nobody else has reacted to the message using
this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current
user. Fires a Message Reaction Add Gateway event. user.
# Arguments # Arguments
* `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or * `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
@ -148,6 +150,7 @@ impl ReactionMeta {
# Returns # Returns
A `Result` containing a [`reqwest::Response`] or a [`crate::errors::InstanceServerError`]. A `Result` containing a [`reqwest::Response`] or a [`crate::errors::InstanceServerError`].
Returns a 204 empty response on success. Returns a 204 empty response on success.
Fires a Message Reaction Add Gateway event.
# Reference # Reference
See [https://discord.com/developers/docs/resources/channel#create-reaction](https://discord.com/developers/docs/resources/channel#create-reaction) See [https://discord.com/developers/docs/resources/channel#create-reaction](https://discord.com/developers/docs/resources/channel#create-reaction)