Skip to content

Commit

Permalink
Update Application part attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
SQKo committed Mar 30, 2024
1 parent 6317488 commit 5695062
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Discord/Parts/OAuth/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ protected function getIconHashAttribute(): ?string
*/
protected function getBotAttribute(): ?User
{
if (! isset($this->attributes['bot'])) {
if (empty($this->attributes['bot'])) {
return null;
}

if ($owner = $this->discord->users->get('id', $this->attributes['bot']->id)) {
return $owner;
if ($bot = $this->discord->users->get('id', $this->attributes['bot']->id)) {
return $bot;
}

return $this->factory->part(User::class, (array) $this->attributes['bot'], true);
Expand All @@ -185,7 +185,7 @@ protected function getBotAttribute(): ?User
*/
protected function getOwnerAttribute(): ?User
{
if (! isset($this->attributes['owner'])) {
if (empty($this->attributes['owner'])) {
return null;
}

Expand Down

0 comments on commit 5695062

Please sign in to comment.