2409 Commits

Author SHA1 Message Date
Willy
43e38654e9
Added docs for overwrites kwarg for CategoryChannel.edit 2020-01-19 15:42:27 -05:00
Rapptz
650beee53d Add instance check to PermissionOvewrite.__eq__ 2020-01-19 02:41:50 -05:00
Rapptz
a1d41f16d8 Document NotFound exception raise in message deletion endpoints 2020-01-18 21:37:06 -05:00
Rapptz
a2b241446e [commands] Document BucketType separately 2020-01-18 20:04:00 -05:00
Rapptz
97d1c970bf [commands] Context.send_help properly sends to on_help_command_error 2020-01-18 19:43:20 -05:00
Rapptz
87f9dcff9c Add support for clearing a specific reaction.
Closes #2440
2020-01-17 19:53:28 -05:00
Rapptz
7b2c01c48a Add support for on_invite_create and on_invite_delete 2020-01-17 19:20:53 -05:00
Rapptz
23f16618fd Make CustomActivity.__str__ not raise errors and match the client 2020-01-15 09:27:32 -05:00
Reece Dunham
e2dc466625
[docs] Fix sphinx warning about heading 2020-01-15 08:26:50 -05:00
apple502j
7af8b313e5 [commands] Add missing async in documentation 2020-01-14 23:46:46 -05:00
Rapptz
5f7a97ff96 Document BaseActivity 2020-01-14 22:09:24 -05:00
Zomatree
1b4b6f8da2 updated the docs for Guild.vanity_invite 2020-01-14 22:07:38 -05:00
Zomatree
4b826a894c
removed parameter section in Asset.read 2020-01-15 02:06:38 +00:00
Rapptz
42a084028c Expose _ActivityTag as BaseActivity to easily refer to. 2020-01-14 20:56:00 -05:00
Rapptz
a841efa087 Add support for custom activities
It's been long enough.

Fixes #2400
2020-01-14 20:37:48 -05:00
Rapptz
e5870903f5 [commands] Force the predicate attribute in checks to be a coroutine 2020-01-14 20:13:33 -05:00
Rapptz
82797b0e60 [commands] Add missing CheckAnyFailure documentation 2020-01-14 19:54:10 -05:00
Rapptz
cd9135b082 Rewrite on_ready delay to actually make sense and prevent heavy sleep 2020-01-14 19:52:06 -05:00
NCPlayz
f95ccf53e0 Fix issue with shard_ready not dispatching when not fetching offline 2020-01-14 19:39:34 -05:00
Michael H
6cdda4a320 Patch clean_prefix for new text editor
The new editor seems to force mentions to have ! even without a nick.
2020-01-14 19:39:34 -05:00
Rapptz
e91675291e Fix bug preventing movement of channels when there are gaps in position
The original code was too aggressive in ensuring that the channel
positions are correct and within bounds. Unfortunately, for Discord
this number is merely a guess and there can be gaps that cause the
position number to be greater than the number of channels currently
in that sorting bucket.

One such example of this is when a channel is deleted and created. When
this happens, the positions are not updated (presumably because Discord
considers this to be too expensive). Sadly this means that if a user
were to create a channel, delete a channel, and then create another one
then there will be gaps in the position sequence.

More concretely, consider the following example:

Channels with position [0, 1, 2, 3, 4]. A new channel is created so it
inherits the maximum position giving us [0, 1, 2, 3, 4, 5]. We delete
a channel that's smaller than the maximum so our list now looks like
[0, 1, 2, 4, 5]. Next time we create a channel we will further
increment the gap, giving us [0, 1, 2, 4, 5, 6]. If a user would want
to move the channel with position 4 to be after position 6 (so in this
case that value would 7) then the library would erroneously raise an
error because it assumed too much about the data integrity.

Luckily, the library upon actually doing the request fixes the channel
positions so everything goes back to normal like it was intended. That
is to say, [0, 1, 2, 3, 4, 5].
2020-01-12 03:27:48 -05:00
Rapptz
bfaf8ecfdb Allow Guild.fetch_members to take in limit=None
Fixes #2473
2020-01-12 02:44:16 -05:00
Rapptz
2770137bd6 Redesign permissions to allow aliases to be used.
This adds manage_permissions, view_channel, and use_external_emojis
aliases to Permissions. It should be noted that to prevent breaking
changes and for sake of usefulness, aliases are not included in
the `__iter__` for either Permissions or PermissionOverwrite.

Fixes #2496
2020-01-11 19:52:25 -05:00
Rapptz
92a3c1b583 [commands] Document guild permission checks 2020-01-07 04:50:52 -05:00
Rapptz
de5caf59d6 Cache member.roles access to avoid surprising performance traps
Without the cache, repeated access could be accidentally quadratic or
worse.
2020-01-06 22:13:35 -05:00
Rapptz
ae3dac0d59 [commands] Add check_any check to OR together various checks 2020-01-06 22:03:56 -05:00
Rapptz
51546dbdb6 [commands] Document the changed Command.can_run behaviour 2020-01-06 04:02:56 -05:00
Rapptz
f1118273f5 Fix Member.mentioned_in returning True if in separate guilds 2020-01-06 00:30:04 -05:00
Rapptz
527b3485dc [commands] Make Command.can_run process disabled commands 2020-01-06 00:30:04 -05:00
NCPlayz
787d424dce Add VoiceRegion.dubai 2020-01-06 00:30:04 -05:00
Rapptz
195b5188e8 Add Attachment.to_file to easily send an attachment.
The first thing someone will ask when someone sees this method is
"Why doesn't `send` just accept `Attachment`?". This question is fair
but it has an issue: exception propagation becomes confusing.

When we save a file and write it to memory an HTTP request is sent
similar to other API calls. Like all HTTP requests, these can fail.
Since these requests denote failure using HTTPException, if it were to
originate within `send` then it becomes confusing to know whether the
attachment saving itself failed or whether the sending failed.

For that reason, and to keep in-line with only 1 type of HTTP call per
method, it doesn't make sense for `send` to support `Attachment`.
2020-01-03 20:42:45 -05:00
Rapptz
6847f13198 Document that widget members may be incomplete.
See https://github.com/discordapp/discord-api-docs/issues/1287
2019-12-29 04:19:08 -05:00
Rapptz
fdab6e464f Remove unnecessary pass using regex in Message.clean_content
The utils.escape_mentions should deal with it
2019-12-25 04:19:27 -05:00
Michael H
6794bdaac5 Use discord.utils.escape_mentions as last step of
discord.Message.clean_content
2019-12-25 04:13:10 -05:00
Christian Clauss
f9b8b234e3
Typo: AuditLogActionCategory 2019-12-23 00:49:17 +01:00
Rapptz
c92ca4ee07 Add Profile.system and Profile.team_user to query newer flags 2019-12-21 07:46:15 -05:00
Rapptz
2de90fbecf Add User.system and MessageFlags.urgent 2019-12-21 07:39:33 -05:00
Rapptz
f7687e0a68 Clean up flag code significantly.
This also fixes the False setting bug.
2019-12-20 21:18:31 -05:00
NCPlayz
9c6a121644 Implement discord.MessageFlags
Refactor flags placement and use it for suppression.
2019-12-20 20:56:40 -05:00
Rapptz
fe1ebb3144 Default the Streaming name to the one passed for user created ones. 2019-12-19 21:26:41 -05:00
NCPlayz
a74bdaa8b2 Add Guild.discovery_splash_url/_as, Guild.rules_channel 2019-12-19 22:19:04 +00:00
Rapptz
d9a8ae9c78 [commands] Add predicate attribute to checks to get inner function 2019-12-18 01:20:50 -05:00
NCPlayz
17901becf0 Add support for YouTube Streaming 2019-12-18 00:01:32 -05:00
NCPlayz
bb71f14ce3 Add RawReactionActionEvent.member 2019-12-17 23:59:59 -05:00
Io Mintz
ecff52a7e8 Document the exception-suppressing behaviour of Message.delete
This is already documented for Messageable.send's delete_after kwarg.

PR #2481
2019-12-17 23:36:19 -05:00
Rapptz
ec4962a14c Wait 5 seconds before IDENTIFYing with an invalidated session. 2019-12-17 23:34:49 -05:00
Rapptz
1179df7e29 [commands] Make Greedy ignore parsing errors. 2019-12-17 00:27:56 -05:00
alexandrianlibrarian
def012e281 Be more explicit in the utils.find example code. 2019-12-17 00:15:16 -05:00
Leaf ▲
ab3eab135f Removed MEMBER_LIST_DISABLED, added PUBLIC_DISABLED 2019-12-17 00:15:16 -05:00
StarrFox
e79ccf3f4c [commands] check if prefix is None in .pages 2019-12-17 00:12:42 -05:00