20 Commits

Author SHA1 Message Date
Rapptz
88b520b5ab Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
Nadir Chowdhury
757cfad38f
Type up **kwargs of various methods 2021-05-10 20:24:48 -04:00
Josh
8b2241916a
Typehint Widget 2021-05-09 23:22:12 -04:00
Steve C
86f10f6dd6
Add missing reprs to some objects
These are WidgetMember, BaseUser, and DeletedReferencedMessage
2021-04-17 18:56:08 -04:00
Rapptz
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
Nadir Chowdhury
89456022cf
Add __all__ to remaining modules 2021-04-07 02:30:32 -04:00
Rapptz
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery 2021-02-24 21:26:51 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Tarek
7f17dc79a6
Remove namedtuples to better future guard the library 2020-09-21 03:36:58 -04:00
Anurag Singh
12e31bb933 Fix KeyError on Member Channels not in JSON 2020-05-29 23:21:36 -04:00
Rapptz
66c6be50d8 Prepare for the discord.com domain rename 2020-05-23 21:44:30 -04:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
42a084028c Expose _ActivityTag as BaseActivity to easily refer to. 2020-01-14 20:56:00 -05:00
Rapptz
6847f13198 Document that widget members may be incomplete.
See https://github.com/discordapp/discord-api-docs/issues/1287
2019-12-29 04:19:08 -05:00
NCPlayz
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
Rapptz
e3631ade4c Fix attribute error in Widget.__repr__ 2019-04-13 18:13:53 -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
Rapptz
2ce42b5b50 Some widget fixes. 2019-03-19 09:23:09 -04:00
NCPlayz
8a30a4cac0 Add support for guild widget 2019-03-19 09:22:48 -04:00