Skip to content

Commit

Permalink
Make fields of BulkBanResponse public (#3005)
Browse files Browse the repository at this point in the history
How are we supposed to use them if they're private?
  • Loading branch information
jamesbt365 authored Oct 28, 2024
1 parent 73d8ff2 commit 2fb922e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/http/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ impl Http {

/// Bans multiple users from a [`Guild`], optionally removing their messages.
///
/// See the [Discord Docs](https://github.com/discord/discord-api-docs/pull/6720) for more information.
/// See the [Discord docs](https://discord.com/developers/docs/resources/guild#bulk-guild-ban)
/// for more information.
pub async fn bulk_ban_users(
&self,
guild_id: GuildId,
Expand Down
7 changes: 4 additions & 3 deletions src/model/guild/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ pub struct Ban {

/// The response from [`GuildId::bulk_ban`].
///
/// [Discord docs](https://github.com/discord/discord-api-docs/pull/6720).
/// [Discord docs](https://discord.com/developers/docs/resources/guild#bulk-guild-ban).
#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[non_exhaustive]
pub struct BulkBanResponse {
/// The users that were successfully banned.
banned_users: Vec<UserId>,
pub banned_users: Vec<UserId>,
/// The users that were not successfully banned.
failed_users: Vec<UserId>,
pub failed_users: Vec<UserId>,
}

#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
Expand Down

0 comments on commit 2fb922e

Please sign in to comment.