Skip to content

Commit

Permalink
Remove placeholder code from Member
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Jan 17, 2025
1 parent be924f0 commit e627ed4
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/Discord/Parts/User/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,42 +219,6 @@ public function setNickname(?string $nick = null, ?string $reason = null): Promi
});
}

public function setDeaf(bool $deaf, ?string $reason = null): PromiseInterface
{
if ($guild = $this->guild) {
if ($botperms = $guild->getBotPermissions()) {
if (! $botperms->deafen_members) {
return reject(new NoPermissionsException("You do not have permission to deafen members in the guild {$guild->id}."));
}
}
}

$headers = [];
if (isset($reason)) {
$headers['X-Audit-Log-Reason'] = $reason;
}

return $this->http->patch(Endpoint::bind(Endpoint::GUILD_MEMBER, $this->guild_id, $this->id), ['deaf' => $deaf], $headers);
}

public function setMute(bool $mute, ?string $reason = null): PromiseInterface
{
if ($guild = $this->guild) {
if ($botperms = $guild->getBotPermissions()) {
if (! $botperms->mute_members) {
return reject(new NoPermissionsException("You do not have permission to mute members in the guild {$guild->id}."));
}
}
}

$headers = [];
if (isset($reason)) {
$headers['X-Audit-Log-Reason'] = $reason;
}

return $this->http->patch(Endpoint::bind(Endpoint::GUILD_MEMBER, $this->guild_id, $this->id), ['mute' => $mute], $headers);
}

/**
* Moves the member to another voice channel.
*
Expand Down

0 comments on commit e627ed4

Please sign in to comment.