Commit Graph

46 Commits

Author SHA1 Message Date
cbff6ddef9 Add support for user collectibles 2025-08-26 03:34:18 -04:00
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
7724764ffe Add ability to use primary guild (clan) data for users
Co-authored-by: blord0 <admin@blord.xyz>
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
Co-authored-by: dolfies <jeyalfie47@gmail.com>
2025-07-17 20:41:30 -04:00
a13fc8f835 Add support for guild_banner and display_banner 2024-07-15 20:24:35 -04:00
4e03b170ef Update pyright version 2024-02-20 13:36:02 -05:00
e25b7ff3f8 Support for avatar decorations
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
2024-01-26 20:12:07 -05:00
40986f9279 Fix overlapping or incorrect slots found by slotscheck 2022-08-08 19:58:48 -04:00
2b9e43dbf9 Change Message.application type to MessageApplication
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-06-13 16:34:41 -04:00
dd52f856f3 Use static_format over format if present in Asset.replace 2022-06-10 01:50:19 -04:00
862eba1e59 Add filename and description kwargs for to_file 2022-04-14 19:04:05 -04:00
e80be19c4d Add to_file for assets and emojis 2022-03-31 01:34:02 -04:00
5aa696ccfa Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
095aaa9ad1 Change wording of InvalidArgument removal in docs 2022-03-11 23:25:43 -05:00
3c6279b947 Implement Guild Scheduled Events 2022-03-01 01:00:04 -05:00
2b69b5d545 Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
2022-02-26 01:44:49 -05:00
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
0b77b52da2 Add support for animated guild banners
https://github.com/discord/discord-api-docs/pull/3948
2022-02-18 20:28:36 -05:00
91652e3b60 Add per-guild member avatar support
Fix #7054
2021-08-22 06:49:42 -04:00
60d82cf908 implement guild stickers 2021-07-30 21:25:41 -04:00
b47133dfb2 Add BaseUser.banner for all subclasses to access new banners 2021-07-28 19:41:43 -04:00
f9bccabac5 Make Asset.with_ functions positional only 2021-06-28 23:36:20 -04:00
d9adf4d35d Make Asset.replace only accept keyword arguments 2021-06-28 23:36:20 -04:00
dc67d2bd85 Replace uses of Ellipsis as sentinels with utils.MISSING 2021-05-03 00:31:07 -04:00
fed259a83b Refactor save() and read() into AssetMixin 2021-04-17 00:56:38 -04:00
9eaf1e85e4 Rewrite Asset design
This is a breaking change.

This does the following transformations, assuming `asset` represents
an asset type.

Object.is_asset_animated() => Object.asset.is_animated()
Object.asset => Object.asset.key
Object.asset_url => Object.asset_url
Object.asset_url_as => Object.asset.replace(...)

Since the asset type now requires a key (or hash, if you will),
Emoji had to be flattened similar to how Attachment was done since
these assets are keyed solely ID.

Emoji.url (Asset) => Emoji.url (str)
Emoji.url_as => removed
Emoji.url.read => Emoji.read
Emoji.url.save => Emoji.save

This transformation was also done to PartialEmoji.
2021-04-16 11:27:23 -04:00
3e92196a2b Add typings for audit logs, integrations, and webhooks 2021-04-10 02:53:24 -04:00
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
89456022cf Add __all__ to remaining modules 2021-04-07 02:30:32 -04:00
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
69bdc3a184 Change copyright year to present 2021-01-15 05:28:11 -05:00
13bba3afc2 Add Emoji.url_as 2020-12-17 22:20:00 -05:00
344cb96c5d Add sticker support 2020-11-23 05:09:20 -05:00
2e2560126f Implement icon_rl_as and cover_image_url_as for AppInfo 2020-11-21 21:11:47 -05:00
02397306b2 Drop superfluous zero in version related changes in the documentation 2020-01-21 03:47:56 -05:00
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
4b826a894c removed parameter section in Asset.read 2020-01-15 02:06:38 +00:00
bf9b9c5879 Adjust BASE urls to have no trailing slash (consistency) 2019-11-15 04:25:38 -05:00
f5ebf42e1f Return invites as https, various URL normalization 2019-11-15 04:25:38 -05:00
3961e7ef6d Support team members data in application info 2019-06-29 19:14:24 -04:00
7543328fe7 Update Sphinx to 2.1.2 2019-06-28 01:43:04 -04:00
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
9674055c2a Add support for animated guild icons. 2019-06-04 19:04:44 -04:00
d80d4145b1 Add Asset.read() to retrieve assets into bytes objects 2019-04-20 15:12:52 -07:00
7c091282ce Add equality comparisons between two assets and hashing an asset. 2019-04-13 17:22:25 -04:00
407d18a30d Fix various bugs with Asset._url None handling. 2019-04-09 05:17:29 -04:00
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