180 Commits

Author SHA1 Message Date
Rapptz
bb45e050b9 Change Modal inheritance to BaseView instead of View 2025-08-24 09:29:41 -04:00
Rapptz
fe7ce982f3 Add second generic parameter for view for DynamicItem 2025-08-24 09:12:12 -04:00
Rapptz
6d5013030b Flip if statement for wrapped ActionRow components in modals 2025-08-22 19:28:37 -04:00
Rapptz
de09031899 Allow TextDisplay as a top-level component in modals 2025-08-22 19:18:33 -04:00
Rapptz
9bda89b0d6 Update total count tracking to always consider the wrapper object 2025-08-21 22:20:12 -04:00
DA344
0309aac335
Add a swap method for dynamic item's dispatching 2025-08-20 18:52:31 -04:00
Rapptz
20f4bc40ad Remove outdated comment 2025-08-20 06:53:03 -04:00
Rapptz
59e28af19f Fix Section.accessory being MISSING 2025-08-20 06:50:23 -04:00
Sacul
27d69e98e2
Fix note in button decorator in action row 2025-08-20 04:04:50 -04:00
DA344
24aa98b923
Fix Section.children and accessory's parent being None 2025-08-19 20:50:57 -04:00
Rapptz
9dbf13c2f9 Document Section.accessory as an attribute 2025-08-19 04:25:29 -04:00
Rapptz
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
Rapptz
3ef6272e07 Fix error with View.from_message when having multiple items 2025-08-18 19:04:19 -04:00
Rapptz
d58c055c5b Remove unused import 2025-08-18 15:07:44 -04:00
Rapptz
5d49f11709 Remove View.from_dict typing 2025-08-18 15:00:51 -04:00
Rapptz
fc12a41cdf Run black 2025-08-18 14:49:32 -04:00
Rapptz
064cb7af71 Add View.total_children_count 2025-08-18 14:42:55 -04:00
Rapptz
f08c042217 Add content_length method to LayoutView and container items 2025-08-18 14:33:15 -04:00
Rapptz
6f6d990195 Fix type error with ItemCallbackType 2025-08-18 07:13:50 -04:00
Rapptz
4854c56d58 Allow discord.File in places where UnfurledMediaItem or str are allowed 2025-08-18 06:11:59 -04:00
Rapptz
9ef5b054e5 Refactor total children count to an overrideable method 2025-08-18 04:49:20 -04:00
Rapptz
2a69ac4ca8 Document difference between View and LayoutView 2025-08-18 04:34:24 -04:00
Rapptz
24d3a12117 Remove unused row parameter from TextDisplay 2025-08-16 06:18:36 -04:00
Rapptz
4f539b710f Fix type errors in all examples 2025-08-16 06:18:36 -04:00
Soheab
13432591c6
Fix various docs around UI items
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2025-08-14 12:00:09 -04:00
Rapptz
38c6407ffd Maintain a reference to View dispatched tasks 2025-08-14 00:47:55 -04:00
Rapptz
3fb627d078 Add support for label components and select in modals 2025-08-14 00:47:55 -04:00
Rapptz
9fb74fd7a1 Remove unnecessary TypeGuard 2025-08-13 21:27:38 -04:00
Rapptz
8c1886799d Don't recreate ItemCallbackType 2025-08-13 21:13:17 -04:00
DA344
50caa3c82c
Add support for components V2
Co-authored-by: Michael H <michael@michaelhall.tech>
Co-authored-by: Soheab <33902984+Soheab@users.noreply.github.com>
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Jay3332 <40323796+jay3332@users.noreply.github.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2025-08-13 20:37:23 -04:00
Leonardo
7f16a06479
Copy Select options when creating View class 2025-06-20 14:24:06 -04:00
Rapptz
8953938a53 Update Pyright to v1.1.394 2025-02-18 03:29:09 -05:00
DA344
6ab747f9e5
Add support for sending views in stateless webhooks 2025-02-17 18:37:20 -05:00
Jun-Ah 준아
97ca618570
Fix incorrect Select max option condition 2024-07-05 16:18:01 -04:00
Rapptz
c055fd32bb Fix ui.Button providing a custom_id for premium buttons 2024-06-15 07:46:36 -04:00
DA344
be9edf8deb
Remove setting sku_id explicitly via button decorator
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2024-06-15 07:38:58 -04:00
DA344
356474ffb9
Add ButtonStyle.premium 2024-06-01 03:48:50 -04:00
Soheab
2248fc1946
Fix various code around Message.interaction(_metadata) 2024-05-06 18:17:37 -04:00
ナニカ
dc6d33c303
copy over original row position for dynamic items 2024-04-18 03:33:43 -04:00
Josh
4e03b170ef
Update pyright version 2024-02-20 13:36:02 -05:00
Rapptz
76666fbcf4 Properly check for maximum number of children 2024-02-17 01:17:31 -05:00
Soheab_
070ae24d8d
Document all limits in discord.ui 2024-01-26 20:08:00 -05:00
Rapptz
3258507b4a Call inner item callback and interaction_check by default 2024-01-24 13:25:48 -05:00
Rapptz
de6a6af5d3 Fix DynamicItem row attribute being overridden 2024-01-06 06:11:39 -05:00
Rapptz
078b500657 Fix dynamic item views having a timeout causing it to evict 2023-12-30 05:00:12 -05:00
Lukas Vacula
3009c46080
Fix typo in documentation; "users" -> "roles" 2023-11-19 19:04:05 -05:00
Soheab_
698363e76b
Refactor from_components for Select classes
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2023-09-30 21:21:29 -04:00
Rapptz
f617d01eee Refactor human_join into its own private helper function 2023-09-30 13:11:29 -04:00
Soheab_
d7f8a39a66
Remove duplicated doc for default_values kwarg for select decorator 2023-09-30 12:47:19 -04:00
Rapptz
c115cfb0ac Remove unnecessary comments 2023-09-29 19:05:52 -04:00