44a44e938f
Reformat entire project with ruff instead of black
2025-08-18 20:16:10 -04:00
4496df79d0
Fix crash in Activity.__init__ with missing keys
...
not all activity payloads have `state_url` and `details_url` keys present.
2025-07-30 18:03:36 -04:00
6e7fc133d1
Add support for new RPC Activity fields
2025-07-30 17:03:15 -04:00
826aa22868
Add platform key in __repr__ method for Game and Streaming
2025-06-20 14:58:30 -04:00
8953938a53
Update Pyright to v1.1.394
2025-02-18 03:29:09 -05:00
d9f81150e1
Add platform property to Activity and Game
...
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com >
2023-12-10 11:39:26 -05:00
2e4eedf5cb
Fix type hint for CustomActivity emoji parameter
2023-09-30 21:58:19 -04:00
1d2177c610
Fix setting CustomActivity name
2023-08-10 16:23:34 -04:00
40986f9279
Fix overlapping or incorrect slots found by slotscheck
2022-08-08 19:58:48 -04:00
d707019348
Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores
2022-08-04 22:46:02 -04:00
0502c6a0d2
Fix two styling nits with fmt: off
2022-05-05 11:35:26 -04:00
e5f3706c02
Fix typo and commas consistency in Activity doc
2022-04-23 22:24:35 -04:00
efe24c3927
Support dynamic rich presence asset URLs
2022-04-22 20:28:45 -04:00
69595b5826
Fix activity button type
2022-04-22 20:22:00 -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
483ffeacd4
Inject state into PartialEmoji in Activity
2022-03-10 20:56:20 -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
cdf46127ae
Added type: ignores where needed to activity.py
2021-08-23 05:22:36 -04:00
8fb998b599
Refactor utcfromtimestamp to use fromtimestamp(..., tz=utc)
2021-07-09 04:20:45 -04:00
750ba88f2c
Fix typing errors with Client
2021-07-04 07:55:20 -04:00
1aeec34f84
Typehint Member and various typing fixes
2021-06-30 01:28:35 -04:00
cd6b453cb3
Typehint Activity
2021-06-28 00:56:28 -04:00
4566b64d77
Fix Activity and Spotify datetime being timezone naive
2021-06-28 00:37:16 -04:00
8b7e5a50b4
Add discord.Spotify.track_url
2021-06-27 23:48:04 -04:00
829c2d4a1a
Add Activity.buttons
2021-04-24 00:27:47 -04:00
99fc950510
Use f-strings in more places that were missed.
2021-04-08 06:02:47 -04:00
a43ea5c550
Fix regression in Activity relying on try_enum
2021-04-07 07:17:04 -04:00
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
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
88c23125ff
Allow CustomActivity emoji to be constructed as documented.
...
Fix #4049
2021-02-18 00:43:19 -05:00
69bdc3a184
Change copyright year to present
2021-01-15 05:28:11 -05:00
df3e5a15a6
[bug] call super constructor for CustomActivity
to fix created_at
2020-11-28 03:17:05 -05:00
c3bca7ec73
Documentation formatting
2020-06-30 23:32:00 -04:00
b4b953bfc6
Fix various inconsistencies within the documentation ( #5067 )
2020-06-28 03:45:58 -04:00
6decfd1d1a
Fix colour properties being displayed as methods in the documentation.
2020-05-03 15:40:13 -04:00
ba112e6ec8
Remove extra backtick in CustomActivity docs
2020-01-24 22:11:04 -05:00
6f9793fe5e
Fixes and improvements for v1.3 documentation
...
* Add missing versionadded strings for v1.3
* Add missing versionchanged string for Message.edit
* Consistently use versionadded for attributes
* Consistently use versionchanged for parameters
* Use versionchanged for Bot.is_owner
* Fix references in v1.3 changelog
* Improve grammar in v1.3 changelog
2020-01-22 23:55:05 -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
23f16618fd
Make CustomActivity.__str__ not raise errors and match the client
2020-01-15 09:27:32 -05:00
42a084028c
Expose _ActivityTag as BaseActivity to easily refer to.
2020-01-14 20:56:00 -05:00
a841efa087
Add support for custom activities
...
It's been long enough.
Fixes #2400
2020-01-14 20:37:48 -05:00
fe1ebb3144
Default the Streaming name to the one passed for user created ones.
2019-12-19 21:26:41 -05:00
17901becf0
Add support for YouTube Streaming
2019-12-18 00:01:32 -05:00
7045639adc
Fix KeyError for things without a created_at
2019-12-05 04:36:04 -05:00
0c97907832
Add Activity.created_at
2019-12-04 18:40:38 -05: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
1e982e0042
Cast activity enumerator to integer instead of accessing value directly
...
Should make the library more resilient to future changes.
2019-06-25 21:50:06 -04:00
2cd6d771ec
Make __repr__ slightly more detailed and add a few missing ones.
...
This includes raw events (which didn't have any) and a few other
types that were missing them. Upon review some more useful fields were
added to the repr output which would be more useful during debugging.
2019-05-26 02:32:47 -04:00