khazhyk 12ca0d9b16 avatar_url_as improvements
static_format will only apply to static (not animated) avatars. Makes
it easier to grab gif-or-'format' of an avatar. Defaults to 'webp'

This is for a similar usecase to avatar_url_as(format=None), except
one can specify the non-animated format, instead of always using
webp.

add User.avatar_is_animated property.

add validation for avatar_url_as, since invalid arguments result in
a url which will return 415, which can be confusing for a user. (They
just see a blank page)

Discord accepts size=16-2048, but images cap at 1024px, so accept 16-1024
Discord accepts "jpg", "jpeg", "png", "gif", and "webp", *unless* the
avatar is not animated, in which case "gif" is not supported. :\
2017-07-25 06:09:40 -04:00
..
2016-05-06 12:23:24 -04:00
2017-07-04 23:16:16 +03:00
2017-04-15 19:55:51 -04:00
2017-07-03 23:14:16 -07:00
2017-07-08 21:33:04 -04:00
2017-01-20 23:19:19 -05:00
2017-01-20 23:19:19 -05:00
2017-01-20 23:19:19 -05:00
2017-07-05 00:48:27 -04:00
2017-07-25 06:09:40 -04:00
2017-07-25 06:09:40 -04:00