Skip to content

Commit

Permalink
fix(message-reaction): Emoji mutator should be nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
SQKo committed Dec 30, 2023
1 parent 34d7e4f commit 61f86bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Discord/Parts/WebSockets/MessageReaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ protected function getMemberAttribute(): ?Member
/**
* Gets the emoji attribute.
*
* @return Emoji
* @return Emoji|null
*/
protected function getEmojiAttribute(): Emoji
protected function getEmojiAttribute(): ?Emoji
{
if (! isset($this->attributes['emoji'])) {
return null;
}

return $this->factory->part(Emoji::class, (array) $this->attributes['emoji'], true);
}

Expand Down

0 comments on commit 61f86bf

Please sign in to comment.