File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1430,13 +1430,14 @@ impl GuildId {
1430
1430
///
1431
1431
/// See the documentation on [`GuildPrune`] for more information.
1432
1432
///
1433
- /// **Note**: Requires the [Kick Members] permission .
1433
+ /// **Note**: Requires [Kick Members] and [Manage Guild] permissions .
1434
1434
///
1435
1435
/// # Errors
1436
1436
///
1437
1437
/// Returns [`Error::Http`] if the current user lacks permission.
1438
1438
///
1439
1439
/// [Kick Members]: Permissions::KICK_MEMBERS
1440
+ /// [Manage Guild]: Permissions::KICK_MEMBERS
1440
1441
#[ inline]
1441
1442
pub async fn start_prune ( self , http : impl AsRef < Http > , days : u8 ) -> Result < GuildPrune > {
1442
1443
http. as_ref ( ) . start_guild_prune ( self , days, None ) . await
Original file line number Diff line number Diff line change @@ -2354,7 +2354,7 @@ impl Guild {
2354
2354
///
2355
2355
/// See the documentation on [`GuildPrune`] for more information.
2356
2356
///
2357
- /// **Note**: Requires the [Kick Members] permission .
2357
+ /// **Note**: Requires [Kick Members] and [Manage Guild] permissions .
2358
2358
///
2359
2359
/// # Errors
2360
2360
///
@@ -2366,13 +2366,14 @@ impl Guild {
2366
2366
/// Can also return an [`Error::Json`] if there is an error deserializing the API response.
2367
2367
///
2368
2368
/// [Kick Members]: Permissions::KICK_MEMBERS
2369
+ /// [Manage Guild]: Permissions::MANAGE_GUILD
2369
2370
/// [`Error::Http`]: crate::error::Error::Http
2370
2371
/// [`Error::Json`]: crate::error::Error::Json
2371
2372
pub async fn start_prune ( & self , cache_http : impl CacheHttp , days : u8 ) -> Result < GuildPrune > {
2372
2373
#[ cfg( feature = "cache" ) ]
2373
2374
{
2374
2375
if let Some ( cache) = cache_http. cache ( ) {
2375
- self . require_perms ( cache, Permissions :: KICK_MEMBERS ) ?;
2376
+ self . require_perms ( cache, Permissions :: KICK_MEMBERS | Permissions :: MANAGE_GUILD ) ?;
2376
2377
}
2377
2378
}
2378
2379
Original file line number Diff line number Diff line change @@ -1119,7 +1119,7 @@ impl PartialGuild {
1119
1119
///
1120
1120
/// See the documentation on [`GuildPrune`] for more information.
1121
1121
///
1122
- /// **Note**: Requires the [Kick Members] permission .
1122
+ /// **Note**: Requires [Kick Members] and [Manage Guild] permissions .
1123
1123
///
1124
1124
/// # Errors
1125
1125
///
@@ -1131,6 +1131,7 @@ impl PartialGuild {
1131
1131
/// Can also return an [`Error::Json`] if there is an error deserializing the API response.
1132
1132
///
1133
1133
/// [Kick Members]: Permissions::KICK_MEMBERS
1134
+ /// [Manage Guild]: Permissions::MANAGE_GUILD
1134
1135
/// [`Error::Http`]: crate::error::Error::Http
1135
1136
/// [`Error::Json`]: crate::error::Error::Json
1136
1137
pub async fn start_prune ( & self , cache_http : impl CacheHttp , days : u8 ) -> Result < GuildPrune > {
You can’t perform that action at this time.
0 commit comments