Skip to content

Commit

Permalink
PHP 8.4: Implicitly nullable parameters deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Nov 21, 2024
1 parent a46e93a commit 4cf5d22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Discord/Discord.php
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ protected function ready()
*
* @throws \UnexpectedValueException
*/
public function updatePresence(Activity $activity = null, bool $idle = false, string $status = 'online', bool $afk = false): void
public function updatePresence(?Activity $activity = null, bool $idle = false, string $status = 'online', bool $afk = false): void
{
$idle = $idle ? time() * 1000 : null;

Expand Down Expand Up @@ -1685,7 +1685,7 @@ public function getChannel($channel_id): ?Channel
*
* @return RegisteredCommand
*/
public function listenCommand($name, callable $callback = null, ?callable $autocomplete_callback = null): RegisteredCommand
public function listenCommand($name, ?callable $callback = null, ?callable $autocomplete_callback = null): RegisteredCommand
{
if (is_array($name) && count($name) == 1) {
$name = array_shift($name);
Expand Down

0 comments on commit 4cf5d22

Please sign in to comment.