From 02db71055cc48cbc1f8ec04a504c13221a9a31ad Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Sat, 3 Jun 2023 18:59:13 +0200 Subject: [PATCH] Add documentation --- src/api/channels/reactions.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/api/channels/reactions.rs b/src/api/channels/reactions.rs index 217912e..1b4378f 100644 --- a/src/api/channels/reactions.rs +++ b/src/api/channels/reactions.rs @@ -12,6 +12,14 @@ pub struct ReactionMeta { } impl ReactionMeta { + /** + Deletes all reactions for a message. + # Arguments + * `user` - A mutable reference to a `UserMeta` instance. + + # Returns + A `Result` containing a `reqwest::Response` or a `crate::errors::InstanceServerError`. + */ pub async fn delete_all( &self, user: &mut UserMeta, @@ -35,6 +43,16 @@ impl ReactionMeta { .await } + /** + Gets a list of users that reacted with a specific emoji to a message. + + # Arguments + * `emoji` - A string slice containing the emoji to search for. + * `user` - A mutable reference to a `UserMeta` instance. + + # Returns + A `Result` containing a `reqwest::Response` or a `crate::errors::InstanceServerError`. + */ pub async fn get( &self, emoji: &str,