Stanisław Jelnicki
9b4e820bbe
Document Invite.inviter as optional
2021-05-12 20:34:44 -04:00
Josh
3864fb37a0
Fix various reference issues in documentation
...
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-05-06 07:51:07 -04:00
Nadir Chowdhury
e762f55847
Add fetch_invite with with_expiration
2021-05-01 07:46:16 -04:00
sudosnok
67abfea61a
Add target_user and target_type to Invite objects
2021-04-21 23:30:35 -04:00
Nadir Chowdhury
f4165755a9
Rename lingering _url Asset properties
2021-04-21 23:24:36 -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
1efdef3ac3
Add typings for invites, templates, and bans
2021-04-10 02:55:10 -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
94bd1b9822
Convert two missing places to f-strings
2021-04-04 07:17:03 -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
xPolar
6c40e3b837
Update docs for discord.Invite.max_uses
...
This mentions the unlimited uses aspect.
2021-02-28 23:35:05 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present
2021-01-15 05:28:11 -05:00
Rapptz
92fffb5daa
Revert "Fix table wrapping"
...
This reverts commit c911cd0dbd06f6c0e774396174fb383fc63d172f.
2020-12-18 21:18:54 -05:00
Rapptz
df57392aea
Fix table wrapping
2020-12-18 21:18:54 -05:00
Tarek
7f17dc79a6
Remove namedtuples to better future guard the library
2020-09-21 03:36:58 -04:00
Skezza
c3bca7ec73
Documentation formatting
2020-06-30 23:32:00 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation ( #5067 )
2020-06-28 03:45:58 -04:00
Anurag
08af907807
Change PartialInviteGuild.icon_url_as to mimic Guild.icon_url_as
2020-06-26 22:52:36 -04:00
Rapptz
0033cc83ef
Fix fetching invites on guilds the user is not in
2020-01-25 03:29:14 -05:00
Rapptz
6ed0ae7d96
Fix fetching invites for a GroupChannel.
...
Closes #2394
Fixes #2383
2020-01-20 07:14:27 -05:00
Rapptz
6071607176
Bump copyright year to 2020
...
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
7b2c01c48a
Add support for on_invite_create and on_invite_delete
2020-01-17 19:20:53 -05:00
Devon R
bf9b9c5879
Adjust BASE urls to have no trailing slash (consistency)
2019-11-15 04:25:38 -05:00
Devon R
f5ebf42e1f
Return invites as https, various URL normalization
2019-11-15 04:25:38 -05:00
NCPlayz
3c9bcc2851
Improve documentation
2019-06-07 19:27:46 -04:00
Rapptz
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
Rapptz
964b97aa30
Add table showing what methods get invite attributes.
2019-05-19 19:17:30 -04:00
Vexs
bf5b267c55
Correct the documentation for methods and properties that return Assets
2019-05-14 19:13:48 -04:00
Benjamin Mintz
a62641bd65
Add back __repr__ that were deleted in the Asset redesign
...
The Asset PR (be227ebcf0c8bad6b56798339b5414b8da414dc0) changed some namedtuple-deriving
classes to object-deriving classes, which meant that the free __repr__ provided by namedtuple
was removed
2019-05-13 20:29:08 -04:00
NCPlayz
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
NCPlayz
fb02191b80
Organise documentation
2019-03-19 08:24:42 -04:00
Nadir Chowdhury
8f7ce7c64e
Add support for reading guild descriptions
...
Added `Guild.description` and `PartialInviteGuild.description`.
2019-03-13 21:24:16 -04:00
Nadir Chowdhury
e18fed6310
Fix imports
...
Removed unnecessary Object import.
Added `snowflake_time` and `InvalidArgument`
2019-03-13 21:22:40 -04:00
SnowyLuma
42a7c4f7e5
Add support for guild banners
...
Document banner attribute of Guild and Invite
Update discord/utils.py
Co-Authored-By: SnowyLuma <38926001+SnowyLuma@users.noreply.github.com>
2019-03-09 00:37:49 -05:00
Rapptz
60f9ac3062
Fix missing imports
2019-02-12 20:25:16 -05:00
Rapptz
5d78f43e55
Expose more information from partial invites, along with counts.
...
This adds the following information.
* `PartialInviteGuild` to replace `Object` patching
* `PartialInviteChannel` to replace `Object` patching
* Invite.approximate_member_count and Invite.approximate_presence_count
The new partial objects provide better documentation on what is
expected when you fetch random invites.
Fixes #1830
2019-02-12 20:22:47 -05:00
Dante Dam
9656a21ebe
Bumped copyright years to 2019.
2019-01-28 22:22:50 -05:00
Hornwitser
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
Hornwitser
d58fc0ccee
[lint] Remove unused imports
...
Left over from various refactoring and rewrites.
2018-08-22 21:43:50 -04:00
DismissedGuy
c84287c007
Add support for splash(_url) to invites
2018-08-22 21:06:09 -04:00
Rapptz
f25091efe1
Drop support for Python 3.4 and make minimum version 3.5.2.
2018-06-10 18:10:00 -04:00
Steve C
0e945915b7
Fixes various documentation errors/inconsistencies
...
Mostly dealing with permissions, also fixes Raw Events inclusion.
2018-05-18 20:25:54 -04:00
Tobotimus
3112e1c17e
Add intersphinx
2018-01-06 17:23:59 -05:00
Rapptz
dcde896e14
Fix __hash__ for Invite objects.
2017-09-04 20:03:07 -04:00
Rapptz
6c67910fa9
Remove Invite.accept.
2017-07-08 21:33:04 -04:00
Rapptz
f4e01b3a92
Make supported operations stand out more than attributes.
2017-05-20 02:08:34 -04:00
Rapptz
3727618b65
Kill remaining references to discord.Channel in documentation.
2017-05-19 21:58:02 -04:00
Rapptz
f73eb087c9
Use describe instead of tables for supported operations.
2017-05-13 18:48:14 -04:00