From 08f83f51951a9f97a001db798dabb1c53facdc37 Mon Sep 17 00:00:00 2001 From: Brandon Date: Mon, 3 Mar 2025 13:21:35 -0600 Subject: [PATCH] =?UTF-8?q?=E2=8F=AA=20Revert=20changes=20in=20#1198=20(Fi?= =?UTF-8?q?xes=20#1296)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Discord/Voice/VoiceClient.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Discord/Voice/VoiceClient.php b/src/Discord/Voice/VoiceClient.php index c68bfd57f..85a112afc 100644 --- a/src/Discord/Voice/VoiceClient.php +++ b/src/Discord/Voice/VoiceClient.php @@ -773,13 +773,13 @@ public function playRawStream($stream, int $channels = 2, int $audioRate = 48000 return $deferred->promise(); } - if ($stream === false && ! $stream instanceof Stream) { + if (! is_resource($stream) && ! $stream instanceof Stream) { $deferred->reject(new \InvalidArgumentException('The stream passed to playRawStream was not an instance of resource or ReactPHP Stream.')); return $deferred->promise(); } - if ($stream !== false) { + if (is_resource($stream)) { $stream = new Stream($stream, $this->loop); } @@ -832,7 +832,7 @@ public function playOggStream($stream): PromiseInterface $stream = $stream->stdout; } - if ($stream !== false) { + if (is_resource($stream)) { $stream = new ReadableResourceStream($stream, $this->loop); } @@ -948,7 +948,7 @@ public function playDCAStream($stream): PromiseInterface $stream = $stream->stdout; } - if ($stream !== false) { + if (is_resource($stream)) { $stream = new ReadableResourceStream($stream, $this->loop); }