Rapptz
f37f3b8212
Properly populate __slots__ for derived user types.
...
Fixes #2265
2019-10-17 20:21:33 -04:00
NCPlayz
3c9bcc2851
Improve documentation
2019-06-07 19:27:46 -04:00
Rapptz
fcf02414fe
Fix stray colon in Asset related docstrings
2019-06-04 19:06:31 -04:00
Rapptz
9674055c2a
Add support for animated guild icons.
2019-06-04 19:04:44 -04:00
Harmon
2fd589874f
Fix wording in documentation for ClientUser.locale
2019-05-21 21:15:26 -04:00
Vexs
bf5b267c55
Correct the documentation for methods and properties that return Assets
2019-05-14 19:13:48 -04:00
Rapptz
f9e95a35f9
Fix USER_UPDATE changes not triggering for member instances.
...
Also add a ClientUser.locale attribute.
2019-04-28 06:36:12 -04:00
Rapptz
6f26a4aad8
Improve performance of value -> enum by about 5x.
2019-04-15 21:30:47 -04:00
Rapptz
cc68cfb896
Add notes to all relationship endpoints that they don't work on bots.
2019-04-14 22:18:14 -04:00
Rapptz
7d385b23a1
Fix copy paste error in ClientUser.edit_settings
2019-04-06 20:19:16 -04:00
NCPlayz
be227ebcf0
Redesign asset retrieval in the library.
...
Most assets now return a new class named `Asset`. This allows for the
assets to be consistently saved via a `save` method instead of special
casing for `Attachment`.
`AppInfo` is no longer a namedtuple it is a fully documented dataclass,
as well as having the state attached to it.
Fixes #1997
2019-04-06 19:12:50 -04:00
CapnS
4ec7213506
Added functionality to edit user settings
...
Changing docs to fit other parts of the lib
Co-Authored-By: CapnS <38225872+CapnS@users.noreply.github.com>
Removing Type Checking
Made all of Rapptz's suggested changes
Removing imports that are no longer needed
2019-03-28 17:33:39 -04:00
NCPlayz
fb02191b80
Organise documentation
2019-03-19 08:24:42 -04:00
Liam H
79f172cf80
Add PremiumType enumeration and ClientUser.premium_type
2019-02-12 19:01:10 -05:00
CapnS
2c7c541f4e
Added User.mutual_friends()
2018-12-14 19:05:33 -05:00
bmintz
c184b0a53d
add support for Bug Hunter and Early Supporter flags
2018-11-24 22:34:22 -05:00
Hornwitser
efb4ff850e
[lint] Fix import order
...
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
2018-11-24 22:17:58 -05:00
Rapptz
860d6a9ace
Revert "Rework documentation to not duplicate inherited members."
...
This reverts commit 96981210b3415e15446db0b702b07fef25c8b680.
2018-10-11 03:42:01 -04:00
Rapptz
96981210b3
Rework documentation to not duplicate inherited members.
...
This will probably be reverted in 1 week.
2018-10-03 05:45:30 -04:00
Rapptz
095f0ec2fc
Optimise some member and user related routines.
...
* Skip user update if possible
* Drop copy.copy in favour of manual copy
Credit to Hornwitser for these findings.
2018-09-24 22:50:05 -04:00
MusicOnline
2c1ba84346
Add colour attribute for BaseUser
2018-09-16 22:46:05 +08:00
Rapptz
5c24e69cf2
Fix up the Sphinx strings causing warnings.
2018-09-15 09:54:00 -04:00
BeatButton
a4d1599ce9
Change docstrings to raw-strings
2018-09-14 22:55:27 -04:00
Bryan Forbes
d7218259aa
Call Http.start_group() in ClientUser.create_group()
2018-08-28 23:50:55 -04:00
mental
ee57e89488
Added hypesquad house functionality
2018-08-22 22:01:19 -04:00
Hornwitser
c557ee33ca
[lint] Fix types used for __slots__ and __all__
...
Stay consistent with the rest of the library and use lists for module
__all__ values and tuples for class __slots__ attributes.
2018-08-22 21:43:55 -04:00
Hornwitser
d58fc0ccee
[lint] Remove unused imports
...
Left over from various refactoring and rewrites.
2018-08-22 21:43:50 -04:00
khazhyk
2c7a855e11
Revert "Ensure gif avatar urls end in .gif
"
...
This reverts commit 456390f417e63126b08ac52fa8ee49ca68cefed8.
This commit isn't needed anymore - the image proxy now properly
handles gifs that do not end in .gif
2018-07-20 04:14:21 -04:00
Rapptz
f25091efe1
Drop support for Python 3.4 and make minimum version 3.5.2.
2018-06-10 18:10:00 -04:00
Tobotimus
3112e1c17e
Add intersphinx
2018-01-06 17:23:59 -05:00
khazhyk
456390f417
Ensure gif avatar urls end in .gif
...
This is a workaround for discord having trouble animating gifs if
the url does not end in exactly `.gif`. Since avatar_url is common
for thumbnails etc., adding this workaround here is handy, and
likely restores expected behavior (animated avatars animating).
2018-01-06 01:29:16 -05:00
Mippy (William)
b5bc5a36ce
Fix Spelling Error
2017-11-12 16:58:28 -05:00
khazhyk
ebecb90c96
is_avatar_animated should always return bool
...
Was returning None when User.avatar was None
2017-10-24 00:16:44 -04:00
Rapptz
51a39b5b1c
Rename avatar_is_animated to is_avatar_animated and make it a method.
2017-07-27 06:26:00 -04:00
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
Rapptz
25a1d8c300
Add support for user flags in Profile.
2017-06-30 18:49:49 -04:00
Rapptz
f588876587
Use Python3Lexer instead of PythonLexer for pygments.
2017-05-22 07:21:23 -04:00
Rapptz
229c471106
More broken Channel references.
2017-05-20 08:48:04 -04:00
Rapptz
f4e01b3a92
Make supported operations stand out more than attributes.
2017-05-20 02:08:34 -04:00
Rapptz
8526995004
Minor speedup when doing comparisons.
...
Shred 2 getattr calls + 1 global lookup to 1 global lookup.
2017-05-18 05:15:06 -04:00
Rapptz
8e34a256a4
Fix User == Member comparisons.
2017-05-18 05:12:48 -04:00
Rapptz
f73eb087c9
Use describe instead of tables for supported operations.
2017-05-13 18:48:14 -04:00
Rapptz
b44bba6ee6
First pass at documentation reform.
2017-05-12 20:14:34 -04:00
Rapptz
058f1f13eb
Fix premium key being missing in profile endpoint.
2017-03-13 00:26:43 -04:00
Rapptz
f7524c9919
Add User.is_blocked and User.is_friend shortcut methods.
2017-02-27 23:29:52 -05:00
Rapptz
2fe5da836c
Add User.avatar_url_as to convert a user's avatar.
2017-02-22 23:17:52 -05:00
Rapptz
bfe2b4fc03
Fix Member.display_name to work.
2017-02-10 03:10:30 -05:00
Rapptz
ca81f0c3fc
Better group DM support.
2017-02-09 20:50:02 -05:00
Rapptz
1cf7b0e2c8
Add ClientUser.friends and ClientUser.blocked
2017-01-27 00:25:04 -05:00
Rapptz
02f30f21c4
Implement User.profile coroutine to get a user's profile.
2017-01-24 22:00:27 -05:00