Skip to content

Commit

Permalink
Update src/Discord/Parts/Guild/Guild.php
Browse files Browse the repository at this point in the history
Co-authored-by: SQKo <87897282+SQKo@users.noreply.github.com>
  • Loading branch information
key2peace and SQKo committed Mar 3, 2024
1 parent 225b530 commit e68dcf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Discord/Parts/Guild/Guild.php
Original file line number Diff line number Diff line change
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 && $botperms->manage_guild)) {
return reject(new NoPermissionsException("You do not have permission to prune members in the guild {$this->id}."));
}

Expand Down

0 comments on commit e68dcf1

Please sign in to comment.