Rapptz
6071607176
Bump copyright year to 2020
...
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
a1d41f16d8
Document NotFound exception raise in message deletion endpoints
2020-01-18 21:37:06 -05:00
Rapptz
87f9dcff9c
Add support for clearing a specific reaction.
...
Closes #2440
2020-01-17 19:53:28 -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
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
NCPlayz
9c6a121644
Implement discord.MessageFlags
...
Refactor flags placement and use it for suppression.
2019-12-20 20:56:40 -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
a6f61dcbde
Fix all deprecation warnings for 3.8
2019-11-20 02:30:19 -05:00
Rapptz
15f0b000e1
Move PartialEmoji over to a new namespace to avoid circular imports
2019-11-20 00:50:19 -05:00
Steve C
5022aa5a0b
Fix broken versionadded in Message.is_system()
2019-09-10 21:10:58 -04:00
Rapptz
1488957a6f
Add Message.is_system to more intuitively filter system messages.
2019-08-27 04:13:46 -04:00
Dice
da4bb0610c
Add CHANNEL_FOLLOW_ADD Message Type
...
Add documentation for MessageType.channel_follow_add
Add versionchanged to new MessageType attr
Add system_content for new MessageType
2019-08-27 04:05:03 -04:00
Rapptz
bbc50c92d0
Add upgraded Member to Message.mentions in case of no cache.
2019-07-10 04:51:27 -04:00
Rapptz
5c1b239b47
Different method of upgrading user instances
2019-07-10 01:23:38 -04:00
Rapptz
70e62e8fe4
Fix regression where Message.edited_at would not update during edits
2019-07-05 23:52:47 -04:00
Rapptz
0cca3ca5c6
Add support for suppressing embeds.
2019-06-29 20:26:47 -04:00
Rapptz
f84219c2b2
Improve performance of parsing MESSAGE_UPDATE and MESSAGE_CREATE events
...
Embed edits are no longer special cased in the dispatch code, which
could lead to on_message_edit being called more often than it used to
be called. I am not sure on the general impact on that being removed.
Fixes #2195
2019-06-07 22:18:01 -04:00
NCPlayz
3c9bcc2851
Improve documentation
2019-06-07 19:27:46 -04:00
Rapptz
5dce3410e6
Add support for new message types related to premium guilds.
2019-06-04 18:30:47 -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
ab6dd2a27a
Add note for Message.tts
...
Fix #2186
2019-05-25 06:17:52 -04:00
Ehren Julien-Neitzert
fc5a2936dd
Fix pluralization errors in various files
...
* Replaced instances of 'return an' with 'returns an'
* fixed pluralization errors
2019-05-23 23:31:17 -04:00
Rapptz
cef8677c68
Proper location of versionadded
2019-04-29 23:34:19 -04:00
Vexs
7dfaa5e9ae
Add read method to attachment objects
...
Refactor save to use new read method
2019-04-29 23:31:17 -04:00
Rapptz
746e20a826
Make Message.ack an actual coroutine function.
2019-04-20 13:49:38 -04:00
Rapptz
a7f3300821
Add versionchanged to Message.delete
2019-04-18 07:58:29 -04:00
Vexs
0f48b78987
Add delay kwarg to message.delete()
...
Refactor delete_after kwargs to use new delay kwarg
2019-04-18 07:56:02 -04:00
Vexs
f38b199d6a
Add support for <:name:id> format for adding reactions
...
Adjust FAQ to match.
2019-04-17 22:42:00 -04:00
Rapptz
14d66e7b9c
Internal consistency with message related HTTPClient methods
2019-04-14 21:05:20 -04:00
Rapptz
bb5aaf2ab3
Missing a word in Attachment.save
2019-04-08 17:19:11 -04:00
Rapptz
79a8249bc7
Add note about escape_markdown in Message.clean_content
...
Fix #1911
2019-04-06 21:50:56 -04:00
Rapptz
7c5a4b67d7
Fix Attachment.save wording nit.
2019-04-06 20:17:12 -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
Rapptz
6ffd079cb9
Support path-like objects in Attachment.save.
...
Fix #1958
2019-03-13 22:04:51 -04:00
Rapptz
73aca4d4d3
Expose Embed.from_data as Embed.from_dict
...
This is a breaking change.
2019-03-13 06:02:56 -04:00
Rapptz
e15b4ef8e4
Revert default parameter use_cached of Attachment.save back to False.
...
Fix #1973
2019-03-10 20:12:24 -04:00
Rapptz
aceec2009a
Have use_cached=True by default for Attachment.save.
...
Also touch up the documentation a bit.
2019-03-06 20:07:38 -05:00
Maku
6f1dff78d4
Added cached saving for attachments
...
Updated docstring
2019-03-06 20:04:40 -05:00
Rapptz
7240d170c1
Update Member.joined_at on MESSAGE_CREATE and document it can be None.
...
Fixes #1638
2019-02-27 06:23:08 -05:00
slice
cfc2e47b4f
Manually calculate millisceond epoch rather than bitshifting
...
Implementation by Danny.
2019-02-15 23:20:06 -08:00
slice
4ab9c874f8
Fix system_content returning incorrect join messages
2019-02-15 22:09:25 -08:00
Dante Dam
9656a21ebe
Bumped copyright years to 2019.
2019-01-28 22:22:50 -05:00
Rapptz
93d576a65b
Add support for spoiler attachments.
2018-12-14 19:09:25 -05:00
Laurenz
dd884a6afe
Update Message.mention_everyone docs to include @here
2018-12-14 19:05:34 -05:00
Hornwitser
a71b3b5fa0
[lint] Limit unneccessarily broad except clauses
...
Add exception qualifier(s) to bare except clauses swallowing exceptions.
2018-11-24 22:17:57 -05:00
Rapptz
3d03dbc451
Change internal role storage in Guild to a dict instead of a list.
...
This adds the following APIs:
* Guild.get_role
This removes the following APIs:
* Guild.role_hierarchy
To compensate for the removed APIs, Guild.roles is now a sorted list
based on hierarchy. The first element will always be the @everyone
role.
This speeds up access at the cost of some memory, theoretically.
2018-09-24 21:08:48 -04:00
BeatButton
a4d1599ce9
Change docstrings to raw-strings
2018-09-14 22:55:27 -04:00
Bryan Forbes
deda5c4e97
Fix behavior of reaction type-conversion
2018-08-25 14:38:19 -05:00