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
Rapptz
769db38401 Fix typing error in sticker edit 2021-08-23 23:52:45 -04:00
Rapptz
490bbffc93 Remove in-place edits and return fresh instances instead
Fixes #4098
2021-08-23 23:46:50 -04:00
Rapptz
655bf25cc8 Document TypeError raise in lottie sticker 2021-07-30 23:18:03 -04:00
Rapptz
6beef898c6 Rename instances of nitro to premium 2021-07-30 23:10:36 -04:00
Nadir Chowdhury
60d82cf908
implement guild stickers 2021-07-30 21:25:41 -04:00
Rapptz
f27e2e073f Fix crash involving stickers 2021-06-12 11:56:51 -04:00
Rapptz
7e1f8bf1b4 Typehint Sticker 2021-05-29 00:19:11 -04:00
Nadir Chowdhury
cbbd31cc9f
fix AttributeError in Sticker.image 2021-04-29 02:16:55 -04:00
Rapptz
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
Nadir Chowdhury
b610998491
Remove Sticker.preview_image 2021-04-16 08:19:39 -04:00
NoName
74f92387ac
Add periods to sticker docs 2021-04-16 07:51:02 -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
ff7094ce96 Convert datetimes to aware datetimes with UTC.
Naive datetimes will now be interpreted as local time throughout
the library.
2021-04-04 23:54:08 -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
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Rapptz
5bad633987 Fix preview_asset key name in Sticker 2020-11-23 06:23:06 -05:00
Rapptz
c8954906cb Sticker implementation cleanup 2020-11-23 06:05:25 -05:00
Zomatree
344cb96c5d
Add sticker support 2020-11-23 05:09:20 -05:00