19 Commits

Author SHA1 Message Date
Lint Action
7513c2138f Fix code style issues with Black 2021-09-05 21:34:20 +00:00
Rapptz
93cc1bdd79 Fix typing errors in PartialEmoji 2021-07-03 11:52:38 -04:00
Rapptz
47f2d04940 Allow passing Emoji in components 2021-06-02 05:30:42 -04:00
Rapptz
6874aa73c4 Add PartialEmoji.from_str helper 2021-05-28 05:34:21 -04:00
Nadir Chowdhury
757cfad38f
Type up **kwargs of various methods 2021-05-10 20:24:48 -04:00
Rapptz
1bf7aadf94 Typehint emoji classes 2021-05-05 23:48:36 -04:00
Rapptz
fed259a83b Refactor save() and read() into AssetMixin 2021-04-17 00:56:38 -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
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
z03h
fb9aa2486d Add PartialEmoji.url_as 2021-01-24 05:17:47 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Steve C
6e6a3bed1a
Add created_at property to PartialEmoji
Also fixed docstring for PartialEmoji.url
2020-12-06 03:59:20 -05:00
Michael
93fa46713a
Fix and add documentation 2020-09-23 03:19:35 -04:00
Eugene
b3d2e24968 Fix possibility of PartialEmoji.id being a string 2020-05-29 23:24:46 -04:00
NCPlayz
c8f32f3151 animated key is never given to reaction_remove(_emoji) 2020-04-06 04:58:27 -04:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
15f0b000e1 Move PartialEmoji over to a new namespace to avoid circular imports 2019-11-20 00:50:19 -05:00