From d695e1d11023ace169eced07ce0d13e4e2bdcb91 Mon Sep 17 00:00:00 2001 From: Valithor Obsidion Date: Wed, 20 Nov 2024 11:03:37 -0500 Subject: [PATCH] Fix incorrect return types --- src/Discord/Parts/Channel/Channel.php | 2 +- src/Discord/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord/Parts/Channel/Channel.php b/src/Discord/Parts/Channel/Channel.php index 310b521da..975d59739 100644 --- a/src/Discord/Parts/Channel/Channel.php +++ b/src/Discord/Parts/Channel/Channel.php @@ -739,7 +739,7 @@ public function limitDelete(int $value, ?string $reason = null): PromiseInterfac * @return PromiseInterface> * @todo Make it in a trait along with Thread */ - public function getMessageHistory(array $options = []): Promise + public function getMessageHistory(array $options = []): PromiseInterface { if (! $this->is_private && $botperms = $this->getBotPermissions()) { if (! $botperms->read_message_history) { diff --git a/src/Discord/functions.php b/src/Discord/functions.php index 1e3736e48..13ede39b6 100644 --- a/src/Discord/functions.php +++ b/src/Discord/functions.php @@ -296,7 +296,7 @@ function escapeMarkdown(string $text): string * @since 10.0.0 Handle `$canceller` internally, use `cancel()` from the returned promise. * @since 7.1.0 */ -function deferFind($array, callable $callback, $loop = null): Promise +function deferFind($array, callable $callback, $loop = null): PromiseInterface { $cancelled = false; $deferred = new Deferred(function () use (&$cancelled) {