Fix stupid multi line comments
This commit is contained in:
parent
fe0c09b0e9
commit
f6d6daf1d2
|
@ -16,20 +16,15 @@ pub struct ReactionMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ReactionMeta {
|
impl ReactionMeta {
|
||||||
/**
|
/// Deletes all reactions for a message.
|
||||||
Deletes all reactions for a message.
|
/// This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user.
|
||||||
This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user.
|
/// # Arguments
|
||||||
|
/// * `user` - A mutable reference to a [`UserMeta`] instance.
|
||||||
# Arguments
|
/// # Returns
|
||||||
* `user` - A mutable reference to a [`UserMeta`] instance.
|
/// A `Result` [`()`] [`crate::errors::ChorusLibError`] if something went wrong.
|
||||||
|
/// Fires a `Message Reaction Remove All` Gateway event.
|
||||||
# Returns
|
/// # Reference
|
||||||
A `Result` [`()`] [`crate::errors::ChorusLibError`] if something went wrong.
|
/// See [https://discord.com/developers/docs/resources/channel#delete-all-reactions](https://discord.com/developers/docs/resources/channel#delete-all-reactions)
|
||||||
Fires a `Message Reaction Remove All` Gateway event.
|
|
||||||
|
|
||||||
# Reference
|
|
||||||
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(&self, user: &mut UserMeta) -> ChorusResult<()> {
|
pub async fn delete_all(&self, user: &mut UserMeta) -> ChorusResult<()> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/channels/{}/messages/{}/reactions/",
|
"{}/channels/{}/messages/{}/reactions/",
|
||||||
|
@ -41,21 +36,16 @@ impl ReactionMeta {
|
||||||
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Gets a list of users that reacted with a specific emoji to a message.
|
||||||
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. The emoji must be URL Encoded or
|
||||||
# Arguments
|
/// the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
||||||
* `emoji` - A string slice containing the emoji to search for. The emoji must be URL Encoded or
|
/// format name:id with the emoji name and emoji id.
|
||||||
the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
/// * `user` - A mutable reference to a [`UserMeta`] instance.
|
||||||
format name:id with the emoji name and emoji id.
|
/// # Returns
|
||||||
* `user` - A mutable reference to a [`UserMeta`] instance.
|
/// A Result that is [`Err(crate::errors::ChorusLibError)`] if something went wrong.
|
||||||
|
/// # Reference
|
||||||
# Returns
|
/// See [https://discord.com/developers/docs/resources/channel#get-reactions](https://discord.com/developers/docs/resources/channel#get-reactions)
|
||||||
A Result that is [`Err(crate::errors::ChorusLibError)`] if something went wrong.
|
|
||||||
|
|
||||||
# Reference
|
|
||||||
See [https://discord.com/developers/docs/resources/channel#get-reactions](https://discord.com/developers/docs/resources/channel#get-reactions)
|
|
||||||
*/
|
|
||||||
pub async fn get(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
pub async fn get(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/channels/{}/messages/{}/reactions/{}/",
|
"{}/channels/{}/messages/{}/reactions/{}/",
|
||||||
|
@ -68,23 +58,18 @@ impl ReactionMeta {
|
||||||
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// 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.
|
||||||
MANAGE_MESSAGES permission to be present on the current user.
|
/// # Arguments
|
||||||
|
/// * `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
||||||
# Arguments
|
/// the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
||||||
* `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
/// format name:id with the emoji name and emoji id.
|
||||||
the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
/// * `user` - A mutable reference to a [`UserMeta`] instance.
|
||||||
format name:id with the emoji name and emoji id.
|
/// # Returns
|
||||||
* `user` - A mutable reference to a [`UserMeta`] instance.
|
/// A Result that is [`Err(crate::errors::ChorusLibError)`] if something went wrong.
|
||||||
|
/// Fires a `Message Reaction Remove Emoji` Gateway event.
|
||||||
# Returns
|
/// # Reference
|
||||||
A Result that is [`Err(crate::errors::ChorusLibError)`] if something went wrong.
|
/// 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)
|
||||||
Fires a `Message Reaction Remove Emoji` Gateway event.
|
|
||||||
|
|
||||||
# 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)
|
|
||||||
*/
|
|
||||||
pub async fn delete_emoji(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
pub async fn delete_emoji(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/channels/{}/messages/{}/reactions/{}/",
|
"{}/channels/{}/messages/{}/reactions/{}/",
|
||||||
|
@ -97,25 +82,21 @@ impl ReactionMeta {
|
||||||
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Create a reaction for the message.
|
||||||
Create a reaction for the message.
|
/// 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
|
||||||
This endpoint requires the READ_MESSAGE_HISTORY permission
|
/// this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current
|
||||||
to be present on the current user. Additionally, if nobody else has reacted to the message using
|
/// user.
|
||||||
this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current
|
/// # Arguments
|
||||||
user.
|
/// * `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
||||||
# Arguments
|
/// the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
||||||
* `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
/// format name:id with the emoji name and emoji id.
|
||||||
the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
/// * `user` - A mutable reference to a [`UserMeta`] instance.
|
||||||
format name:id with the emoji name and emoji id.
|
/// # Returns
|
||||||
* `user` - A mutable reference to a [`UserMeta`] instance.
|
/// A `Result` containing [`()`] or a [`crate::errors::ChorusLibError`].
|
||||||
|
/// # Reference
|
||||||
# Returns
|
/// See [https://discord.com/developers/docs/resources/channel#create-reaction](https://discord.com/developers/docs/resources/channel#create-reaction)
|
||||||
A `Result` containing [`()`] or a [`crate::errors::ChorusLibError`].
|
///
|
||||||
|
|
||||||
# Reference
|
|
||||||
See [https://discord.com/developers/docs/resources/channel#create-reaction](https://discord.com/developers/docs/resources/channel#create-reaction)
|
|
||||||
*/
|
|
||||||
pub async fn create(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
pub async fn create(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/channels/{}/messages/{}/reactions/{}/@me/",
|
"{}/channels/{}/messages/{}/reactions/{}/@me/",
|
||||||
|
@ -128,22 +109,17 @@ impl ReactionMeta {
|
||||||
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Delete a reaction the current user has made for the message.
|
||||||
Delete a reaction the current user has made for the message.
|
/// # Arguments
|
||||||
|
/// * `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
||||||
# Arguments
|
/// the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
||||||
* `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
/// format name:id with the emoji name and emoji id.
|
||||||
the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
/// * `user` - A mutable reference to a [`UserMeta`] instance.
|
||||||
format name:id with the emoji name and emoji id.
|
/// # Returns
|
||||||
* `user` - A mutable reference to a [`UserMeta`] instance.
|
/// A `Result` containing [`()`] or a [`crate::errors::ChorusLibError`].
|
||||||
|
/// Fires a `Message Reaction Remove` Gateway event.
|
||||||
# Returns
|
/// # Reference
|
||||||
A `Result` containing [`()`] or a [`crate::errors::ChorusLibError`].
|
/// See [https://discord.com/developers/docs/resources/channel#delete-own-reaction](https://discord.com/developers/docs/resources/channel#delete-own-reaction)
|
||||||
Fires a `Message Reaction Remove` Gateway event.
|
|
||||||
|
|
||||||
# Reference
|
|
||||||
See [https://discord.com/developers/docs/resources/channel#delete-own-reaction](https://discord.com/developers/docs/resources/channel#delete-own-reaction)
|
|
||||||
*/
|
|
||||||
pub async fn remove(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
pub async fn remove(&self, emoji: &str, user: &mut UserMeta) -> ChorusResult<()> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/channels/{}/messages/{}/reactions/{}/@me/",
|
"{}/channels/{}/messages/{}/reactions/{}/@me/",
|
||||||
|
@ -156,25 +132,19 @@ impl ReactionMeta {
|
||||||
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
handle_request_as_result(request, user, crate::api::limits::LimitType::Channel).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Delete a user's reaction to a message.
|
||||||
Delete a user's reaction to a message.
|
/// This endpoint requires the MANAGE_MESSAGES permission to be present on the current user.
|
||||||
|
/// # Arguments
|
||||||
This endpoint requires the MANAGE_MESSAGES permission to be present on the current user.
|
/// * `user_id` - ID of the user whose reaction is to be deleted.
|
||||||
|
/// * `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
||||||
# Arguments
|
/// the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
||||||
* `user_id` - ID of the user whose reaction is to be deleted.
|
/// format name:id with the emoji name and emoji id.
|
||||||
* `emoji` - A string slice containing the emoji to delete. The `emoji` must be URL Encoded or
|
/// * `user` - A mutable reference to a [`UserMeta`] instance.
|
||||||
the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the
|
/// # Returns
|
||||||
format name:id with the emoji name and emoji id.
|
/// A `Result` containing [`()`] or a [`crate::errors::ChorusLibError`].
|
||||||
* `user` - A mutable reference to a [`UserMeta`] instance.
|
/// Fires a Message Reaction Remove Gateway event.
|
||||||
|
/// # Reference
|
||||||
# Returns
|
/// See [https://discord.com/developers/docs/resources/channel#delete-own-reaction](https://discord.com/developers/docs/resources/channel#delete-own-reaction)
|
||||||
A `Result` containing [`()`] or a [`crate::errors::ChorusLibError`].
|
|
||||||
Fires a Message Reaction Remove Gateway event.
|
|
||||||
|
|
||||||
# Reference
|
|
||||||
See [https://discord.com/developers/docs/resources/channel#delete-own-reaction](https://discord.com/developers/docs/resources/channel#delete-own-reaction)
|
|
||||||
*/
|
|
||||||
pub async fn delete_user(
|
pub async fn delete_user(
|
||||||
&self,
|
&self,
|
||||||
user_id: Snowflake,
|
user_id: Snowflake,
|
||||||
|
|
Loading…
Reference in New Issue