56916f9241
Fix comparisons between two Object with types
2024-02-22 20:42:24 -05:00
6981eb69c4
Normalize type formatting in TypeError
...
Normalize most mixed usages of `__class__`, `__class__!r`,
`__class__.__name__!r` to the standard form of
`__class__.__name__`
2022-09-12 15:25:55 -04:00
1787867320
Add support for specifying the type of a generic discord.Object
...
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com >
2022-08-06 14:23:37 -04:00
eea70b53cd
Fix small typos in docstrings
2022-07-11 00:05:09 -04: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
588cda0996
Refactor AsyncIter to use 3.6+ asynchronous generators
2022-02-19 21:58:13 -05:00
7fde57c89a
Type-hint object.py
2021-05-05 10:29:07 -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
e473f3c775
Convert id parameter of Object into int or raise TypeError on failure
...
This prevents breakage for users who pass in a str as an ID whereas
it previously worked.
Fix #4002
2020-04-19 18:33:03 -04:00
6071607176
Bump copyright year to 2020
...
Closes #2510
2020-01-19 20:03:00 -05:00
017d428db5
Fix discord.Object type hinting docs
...
discord.Object requires ID as an int not str
2019-09-19 21:15:41 -04:00
3c9bcc2851
Improve documentation
2019-06-07 19:27:46 -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
fb02191b80
Organise documentation
2019-03-19 08:24:42 -04:00
9656a21ebe
Bumped copyright years to 2019.
2019-01-28 22:22:50 -05:00
c8b49d37be
[lint] Fix incorrect and inconsistent whitespace
...
Adjust whitespace to be consistent with the rest of the library.
2018-08-22 21:43:53 -04:00
3112e1c17e
Add intersphinx
2018-01-06 17:23:59 -05:00
f554861e68
Make discord.Object hashable.
2017-08-09 18:39:32 -04:00
ff9f5749e1
Update copyright year to 2017.
2017-01-20 23:19:19 -05:00
98b981848d
Move message creation to a factory method inside ConnectionState.
2017-01-03 09:52:10 -05:00
79a49f9145
Absolute import some circular dependencies to appease Python 3.4.
2017-01-03 09:52:02 -05:00
1a0182e6eb
Fix import for Object.created_at
2016-09-10 23:06:02 -04:00
bbc78b29ae
Fix discord.Object documentation.
2016-05-31 20:39:12 -04:00
2ef38107d8
Add missing created_at properties for other objects.
...
Such as Channel, PrivateChannel, Object and Role.
2016-03-25 18:30:42 -04:00
db4cc791dd
Update license of files to 2016.
2016-01-04 22:28:29 -05:00
97874293e2
Revert "Use super() in classes that could be subclassed."
...
This reverts commit 948f565b43
.
2016-01-04 20:26:59 -05:00
948f565b43
Use super() in classes that could be subclassed.
2016-01-04 18:25:20 -05:00
9f92536441
Clean-up documentation to use NumPy style docs on remaining classes.
2015-12-16 22:20:54 -05:00
17171aaa60
Switch to NumPy style documentation.
2015-12-04 23:43:31 -05:00
9f12067b3d
Add discord.Object class for generic pass-by-ID.
2015-10-27 17:04:50 -04:00