195 Commits

Author SHA1 Message Date
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Misa
5d75a0e7d6
Capitalize Discord in docs of message related attributes 2020-12-26 02:34:22 -05:00
Rapptz
52d587d286 Allow PartialMessage to work with DM channels as well 2020-12-11 02:32:51 -05:00
Rapptz
186f4968d3 Export to_message_reference_dict to make PartialMessage.reply work 2020-12-11 00:39:05 -05:00
Rapptz
ebf623d9de Add operations you can do to a Message and PartialMessage to docs 2020-12-11 00:32:38 -05:00
Rapptz
3fe6d261f1 Add PartialMessage to allow working with channel/message_id pairs.
Fix #5905
2020-12-11 00:32:38 -05:00
Rapptz
b00aaab0b2 Revert Message.edit logic that deals with allowed_mentions
It made no sense here.
2020-12-08 21:13:29 -05:00
Lilly Rose Berner
08d632880a
Fix embed suppression when using client-wide allowed_mentions 2020-12-08 20:42:26 -05:00
Nadir Chowdhury
6b803acde4
[chore] Remove redundant imports
This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
2020-11-28 03:16:49 -05:00
Rapptz
a4cb71b64e Fix Message.to_reference from the MessageReference changes 2020-11-27 03:31:10 -05:00
Rapptz
5ef30e34e5 Correct docstring missing ] 2020-11-27 02:36:14 -05:00
Rapptz
34f2fb36b1 Added MessageReference.resolved attribute to get replied to message 2020-11-27 02:24:39 -05:00
Rapptz
1014bfcb63 Allow MessageReference to be constructible by users 2020-11-27 01:08:52 -05:00
Rapptz
bd6ab93348 Code cleanup involving enums and message replies 2020-11-27 00:32:08 -05:00
PikalaxALT
d1cb30cccf
Implement discord.Message.reply 2020-11-26 23:19:00 -05:00
Rapptz
f174365d33 Ensure member key is not overwritten by author key in MESSAGE_UPDATE
This also coerces the older message to take the member data from the
newer message so the types are not incompatible.

Fix #5999
2020-11-23 06:02:27 -05:00
Zomatree
344cb96c5d
Add sticker support 2020-11-23 05:09:20 -05:00
PythonCoderAS
a40e20fa38
Use Hashable mixin for Message 2020-10-16 22:46:08 -04:00
Michael
93fa46713a
Fix and add documentation 2020-09-23 03:19:35 -04:00
Sebastian Law
37c5c583f2
Add support for message_reference on Message object 2020-09-23 02:29:03 -04:00
Rapptz
a183c4f752 Completely update member references from message inner members.
Fixes #5819
2020-09-17 02:45:53 -04:00
Andres Torres
39aa08ab93
Added __eq__ to Message 2020-09-04 08:42:31 -04:00
ELginas
891531fac0
Fixed a typo in message unpinning docs 2020-08-05 21:44:11 -04:00
Rapptz
ec3c3eb4c6 Update message references in AutoShardedConnectionState
Fixes #5133
2020-07-25 09:59:40 -04:00
Nadir Chowdhury
e971e2f16c
Allow more methods to set an audit log reason 2020-06-30 23:35:42 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
Rapptz
de7c96333c Update Message.system_content join strings to be up to date.
Fixes #4211
2020-06-27 03:45:27 -04:00
Zomatree
a22d38d004 Add spoiler keyword argument to Attachment.to_file 2020-05-23 21:56:40 -04:00
Rapptz
66c6be50d8 Prepare for the discord.com domain rename 2020-05-23 21:44:30 -04:00
StarrFox
6e8d538f09 add support for allowed_mentions with message edit 2020-05-10 16:48:31 -04:00
Rapptz
1f73e18bc6 Make use_cached keyword only 2020-05-03 01:58:52 -04:00
Josh
c424d82f74 Add versionadded to Attachment.to_file use_cached param 2020-05-02 19:57:48 -04:00
Kowlin
08e20910e6 Edit message publish documentation 2020-04-14 03:24:46 -04:00
Maku
c2d5c2e118 Add use_cached to Attachment.to_file 2020-04-04 03:03:20 -04:00
Rapptz
af6a5efa53 Fix crashes when Message.guild is Object 2020-02-16 21:52:20 -05:00
Merlintor
1451f790a0 Explicitly check for guild object 2020-01-26 14:43:10 +01:00
Harmon
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
Rapptz
02397306b2 Drop superfluous zero in version related changes in the documentation 2020-01-21 03:47:56 -05:00
Rapptz
4cf02c9461 Update attachment documentation for width/height applying to videos too 2020-01-20 00:10:37 -05:00
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