352 Commits

Author SHA1 Message Date
DA344
afbbc07e98
Add support for poll result messages 2025-01-19 05:09:05 -05:00
Violet
55974ebde8
Fix MessageSnapshot sticker_items typo 2025-01-15 18:40:16 -05:00
Soheab
814ce3c8ee
Add command target to MessageInteractionMetadata 2024-11-09 06:19:43 -05:00
Steve C
c8ecbd8d10
Add Message.forward flag 2024-10-22 12:01:34 -04:00
DA344
99a7093c34
Add support for message forwarding
Co-authored-by: Red Magnos <redmagnos@gmail.com>
Co-authored-by: MCausc78 <mcausc78@gmail.com>
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2024-10-11 15:34:18 -04:00
owocado
48cf500e09
Fix Message.system_content for role_subscription_purchase renewal type 2024-10-11 02:08:27 -04:00
Soheab
b3141db6e9
Add support for messages with type purchase_notification 2024-10-10 19:43:07 -04:00
Andrin
20c543f672
Add support for message call 2024-10-10 05:21:59 -04:00
iyad-f
9d7c253535
Add missing error for Message.edit 2024-10-09 18:11:27 -04:00
Rapptz
66d74054dd Remove outdated leftover comment about polls 2024-08-31 08:32:52 -04:00
Rapptz
733c583b72 Remove _get_poll lookup in Message constructor
This was triggering a terrible performance regression for no good
reason for all created messages that didn't have a poll, which is
essentially 99.99% of messages leading to MESSAGE_CREATE dispatches
having degraded performance.
2024-08-31 08:29:05 -04:00
Soheab
a6d1dc0455
Add support for getting the attachment's title 2024-08-28 15:32:20 -04:00
Rapptz
efe81a67fb Fix Message.poll not prioritising API data over cached data 2024-05-22 09:04:37 -04:00
DA344
e43bd8692c
Add support for Polls
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Josh <8677174+bijij@users.noreply.github.com>
Co-authored-by: Trevor Flahardy <75498301+trevorflahardy@users.noreply.github.com>
2024-05-10 06:14:12 -04:00
Soheab
2248fc1946
Fix various code around Message.interaction(_metadata) 2024-05-06 18:17:37 -04:00
Soheab
963bb08557
Add support for Message.interaction_metadata
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2024-05-05 23:36:08 -04:00
Andrin
08ef42fedf
Add new incident message types
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2023-12-18 17:45:44 -05:00
Lilly Rose Berner
29344b9cce
Add thread getters to Message 2023-12-10 11:37:03 -05:00
Soheab_
14faa9bdab
Add support for attachment flags 2023-07-14 21:41:44 -04:00
Rapptz
c5da0fe7c1 Remove and address stale TODO comments 2023-06-11 12:41:04 -04:00
Rapptz
f1bade4bda Hoist webhook detection outside of store_user helper 2023-06-11 12:41:04 -04:00
RedGuy12
54c62d7ef8
Fix system message for channel_icon_change 2023-05-19 20:35:56 -04:00
Andrin S
1767be0081
Add support for voice messages
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2023-04-20 00:08:04 -04:00
Rapptz
0adef0ec89 Update auto_archive_duration documentation
Fix #9351
2023-04-18 06:03:48 -04:00
Andrin S
2ddb9d22ba
Add overloads to reply and send 2023-03-30 08:36:33 -04:00
Rapptz
bd6bbdab00 Add support for stage message types 2023-02-27 09:17:40 -05:00
Rapptz
fd9f3e9eff Update docs with references to text in stage 2023-02-25 03:27:04 -05:00
Rapptz
da4651c97c Implement Messageable for StageChannel
Fix #9248
2023-02-25 03:13:55 -05:00
owocado
3644f7849c
Document auto_archive_duration accepted values 2023-02-23 07:23:22 -05:00
Rapptz
94fa00fbfd Clarify documentation on Message.publish 2023-02-13 23:54:02 -05:00
Rapptz
a2b09c0ecd Remove unused import 2023-02-11 18:40:17 -05:00
Rapptz
ec71a46907 Fix Message.channel rebinding sometimes being Object 2023-02-11 18:25:42 -05:00
Rapptz
7e95f98521 Fix webhooks and interactions not closing files after a request 2023-01-25 04:22:24 -05:00
Rapptz
3d2dedbc58 Add Message.position and Message.application_id attributes 2023-01-21 22:48:36 -05:00
Rapptz
3d24f0fb12 Add support for role subscription reading 2023-01-10 18:05:00 -05:00
Jonah Lawrence
d7b6a2ad12
Fix usage of single backticks to links and code-blocks 2022-10-26 04:26:56 -04:00
Omkaar
c30a2f3ca0
Refactor certain f-strings and literals 2022-10-02 17:50:56 -04:00
Steve C
ce06beeb6c
Fix permissions-based docstrings to be more consistent 2022-09-17 14:07:39 -04:00
James Hilton-Balfe
40986f9279
Fix overlapping or incorrect slots found by slotscheck 2022-08-08 19:58:48 -04:00
Lilly Rose Berner
e0341c9ef2
Add forum post rename system message 2022-07-11 06:05:07 -04:00
Emily
55849d996e
Update documentation for discord.Message
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-06-27 00:48:36 -04:00
Rapptz
7e66e11640 Change Message.system_content to always return str 2022-06-14 20:38:39 -04:00
Alex Nørgaard
2b9e43dbf9
Change Message.application type to MessageApplication
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-06-13 16:34:41 -04:00
nickofolas
59ebfefbf4
Use __getitem__ to access channel_id in MessageReference payloads 2022-06-01 02:32:42 -04:00
Ryan H
dbb00bd361
Add Reaction into typehint of add_reaction() 2022-05-17 03:36:35 -04:00
Lilly Rose Berner
7267d18d9e
Improve component typing 2022-05-16 15:30:03 -04:00
Rapptz
d8846570ae Remove unnecessary type ignore
Despite this except branch is no longer guarded, the exceptional
case could still happen if an Object is passed or if a future channel
type leads to breakage
2022-05-05 01:46:19 -04:00
Rapptz
d56f5150fa Fix oversight of edit parameters not being keyword only 2022-05-04 05:02:42 -04:00
Rapptz
6771f3dc99 Remove extraneous channel assignment 2022-05-02 06:54:54 -04:00
Rapptz
a0dfdb9b1d Fix multiple view instances not dispatching in app commands responses
Due to a quirk in InteractionResponse.send_message not returning a
message, all messages sent with an associated View would end up having
no message_id set. When multiple instances of a View are responded to
in a slash command context, this meant that the newest one would
override the storage of the older one. Ultimately leading to the first
view instance causing interaction failures.

Since fetching the original message is an unacceptable solution to the
problem due to incurred requests, the next best thing is to store an
intermediate interaction_id as a stop gap to differentiate between
the multiple instances. This change however, came with its own set of
complications.

Due to the interaction_id being an intermediate stop gap, the
underlying storage of the view store had to be changed to accommodate
the different way of accessing the data. Mainly, the interaction_id
key had to be quick to swap and remove to another key. This solution
attempts to change the interaction_id interim key with
a full fledged message_id key when it receives one if it's possible.

Note that the only way to obtain the interaction_id back from the
component interaction is to retrieve it from the MessageInteraction
data structure. This is because using the interaction_id of the button
press would be a different interaction ID than the one set as an
interim key. As a consequence, this stop gap only works for application
command based interactions. I am not aware of this bug manifesting in
component based interactions.

This patch also fixes a bug with ViewStore.remove_view not working due
to a bug being suppressed by a type: ignore comment. It also removes
the older __verify_integrity helper method since clean-up is already
done through View.stop() or View timeout.

Hopefully in the near future, the `/callback` endpoint will return
actual message data and this stop gap fix will no longer be necessary.
2022-04-28 12:24:57 -04:00