Skip to content

Commit

Permalink
Revert "Permissions Change for Pruning (#1204)"
Browse files Browse the repository at this point in the history
This reverts commit f2f6b11.
  • Loading branch information
key2peace authored Mar 4, 2024
1 parent f2f6b11 commit df76e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Discord/Parts/Guild/Guild.php
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ public function getPruneCount(array $options = []): ExtendedPromiseInterface
$options = $resolver->resolve($options);

$botperms = $this->getBotPermissions();
if ($botperms && ! ($botperms->kick_members && $botperms->manage_guild)) {
if ($botperms && ! $botperms->kick_members) {
return reject(new NoPermissionsException("You do not have permission to get prune count in the guild {$this->id}."));
}

Expand Down Expand Up @@ -1283,7 +1283,7 @@ public function beginPrune(array $options = [], ?string $reason = null): Extende
$options = $resolver->resolve($options);

$botperms = $this->getBotPermissions();
if ($botperms && ! ($botperms->kick_members && $botperms->manage_guild)) {
if ($botperms && ! $botperms->kick_members) {
return reject(new NoPermissionsException("You do not have permission to prune members in the guild {$this->id}."));
}

Expand Down

0 comments on commit df76e0b

Please sign in to comment.