Skip to content

Commit

Permalink
On nickname discriminator is now displayed only if the user has assig…
Browse files Browse the repository at this point in the history
…ned one (#1042)
  • Loading branch information
Havenstd06 authored Jul 24, 2023
1 parent 11f6a8d commit c71c379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function mapUserToObject(array $user)
{
return (new User())->setRaw($user)->map([
'id' => $user['id'],
'nickname' => sprintf('%s#%s', $user['username'], $user['discriminator']),
'nickname' => $user['username'].($user['discriminator'] !== '0' ? '#'.$user['discriminator'] : ''),
'name' => $user['username'],
'email' => $user['email'] ?? null,
'avatar' => $this->formatAvatar($user),
Expand Down

0 comments on commit c71c379

Please sign in to comment.