wohali / oauth2-discord-new

New Discord Provider for the OAuth 2.0 Client
MIT License
118 stars 22 forks source link

Get User Avatar? #15

Closed poyrazhancilar closed 5 years ago

poyrazhancilar commented 5 years ago

Before this post (https://github.com/wohali/oauth2-discord-new/issues/14) I tried this code: $avatar = "https://cdn.discordapp.com/avatars/" . $user->getId() . "/" . $user->getAvatar() . ".png";

But I get this errors:

[23-Oct-2018 19:43:03 Europe/Istanbul] PHP Fatal error: Uncaught Error: Call to undefined method Wohali\OAuth2\Client\Provider\DiscordResourceOwner::getAvatar() in /home/gameuxst/discordbotlist.gameuxst.com/login.php:58 Stack trace:

0 {main}

thrown in /home/gameuxst/discordbotlist.gameuxst.com/login.php on line 58

Please help, thanks :)

poyrazhancilar commented 5 years ago

I did it thanks.