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

Expand delete_messages documentation #2973

Open
wants to merge 1 commit into
base: current
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/model/channel/channel_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,18 @@ impl ChannelId {
http.as_ref().delete_message(self, message_id.into(), None).await
}

/// Deletes all messages by Ids from the given vector in the given channel.
/// Deletes messages by Ids from the given vector in the given channel.
///
/// The minimum amount of messages is 2 and the maximum amount is 100.
/// The Discord API supports deleting between 2 and 100 messages at once. This function
/// also handles the case of a single message by calling `delete_message` internally.
///
/// Requires the [Manage Messages] permission.
///
/// **Note**: Messages that are older than 2 weeks can't be deleted using this method.
///
/// # Errors
///
/// Returns [`ModelError::BulkDeleteAmount`] if an attempt was made to delete either 0 or more
/// Returns [`ModelError::BulkDeleteAmount`] if an attempt was made to delete 0 or more
/// than 100 messages.
///
/// Also will return [`Error::Http`] if the current user lacks permission to delete messages.
Expand Down
Loading