Commit Graph

53 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
3fb627d078 Add support for label components and select in modals 2025-08-14 00:47:55 -04:00
8c1886799d Don't recreate ItemCallbackType 2025-08-13 21:13:17 -04:00
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
8953938a53 Update Pyright to v1.1.394 2025-02-18 03:29:09 -05:00
97ca618570 Fix incorrect Select max option condition 2024-07-05 16:18:01 -04:00
4e03b170ef Update pyright version 2024-02-20 13:36:02 -05:00
070ae24d8d Document all limits in discord.ui 2024-01-26 20:08:00 -05:00
3009c46080 Fix typo in documentation; "users" -> "roles" 2023-11-19 19:04:05 -05:00
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
f617d01eee Refactor human_join into its own private helper function 2023-09-30 13:11:29 -04:00
d7f8a39a66 Remove duplicated doc for default_values kwarg for select decorator 2023-09-30 12:47:19 -04:00
c115cfb0ac Remove unnecessary comments 2023-09-29 19:05:52 -04:00
7f7a0acd21 Fix GuildChannel subclasses not working with default select values
This also fixes it so ClientUser is respected as well
2023-09-29 19:04:15 -04:00
c5ecc42c72 Add support for default_values field on selects 2023-09-29 15:55:20 -04:00
e67d00502d Fix View.from_message not creating other Selects 2023-09-12 13:03:29 -04:00
6b6cbc44ce Fix TextInput's is_persistent() flow 2023-06-04 07:50:56 -04:00
1de3562f34 Fix partially uknown typing errors 2023-03-01 19:14:50 -05:00
40227f75de Fix select decorator type checking error 2023-02-13 23:53:56 -05:00
ed40d55f99 Fix overloads for select decorator 2023-01-16 20:54:29 -05:00
7cf3cd51a5 Revert "Infer select type from callback annotation 2022-12-18 05:17:41 -05:00
b671958e11 Infer select type from callback annotation 2022-12-14 21:59:16 -05:00
f61f7411df Add setter method for ChannelSelect.channel_types 2022-11-17 05:46:09 -05:00
5009c83bc9 Implement New Select Types
Co-authored-by: Soheab_ <33902984+Soheab@users.noreply.github.com>
Co-authored-by: rdrescher909 <51489753+rdrescher909@users.noreply.github.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-10-27 10:03:45 -04:00
6981eb69c4 Normalize type formatting in TypeError
Normalize most mixed usages of `__class__`, `__class__!r`, 
`__class__.__name__!r` to the standard form of 
`__class__.__name__`
2022-09-12 15:25:55 -04:00
e62473a1b4 Fix incorrect docs in select menu min_values 2022-08-27 03:09:03 -04:00
ff1dd586d3 Always use last value as a fallback for Select.values 2022-08-14 15:50:16 -04:00
9c38cf3aef Fix ui.Select.values in modals 2022-08-14 15:25:43 -04:00
d826f4f3a8 Change ui.Select.values to a ContextVar to avoid race conditions 2022-08-09 08:37:46 -04:00
c26473d0eb Fix views not being persistent if modifying custom_id after __init__ 2022-07-31 04:53:25 -04:00
7267d18d9e Improve component typing 2022-05-16 15:30:03 -04:00
7ee15e1d68 Use typing.Literal for channel and component type annotation 2022-04-29 06:07:22 -04:00
e515378076 Remove annotation on row property in subclasses 2022-03-29 23:04:34 -04:00
3215cb65e2 Raise if custom_id is not a str 2022-03-29 23:04:34 -04:00
968a1f366f Change View callback order to (self, interaction, item)
This is more consistent with the rest of the library which always has
the interaction as the first parameter. This has been done before in
the command extension as well, the first parameter is always either
self or the context.
2022-03-24 23:00:50 -04:00
934ab4151a Mark state refresh methods as private with an underscore
People kept wondering what it is or what it does.
2022-03-14 07:50:25 -04:00
5aa696ccfa Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
4c8b1f9abd Remove unused imports 2022-03-05 21:40:42 -05:00
147948af9b Use typing.Self throughout library 2022-03-01 07:53:24 -05:00
d409ddd227 Alter return-type of button/select decorators 2022-02-21 21:54:44 -05:00
88b520b5ab Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
19c6687b55 Add support for Modal Interactions 2022-02-20 04:57:44 -05:00
3382d2e9e8 Update documentation on select limits 2021-08-25 09:21:49 -04:00
ca9b371982 Add support for discord.ui.Select.disabled 2021-07-28 19:58:39 -04:00
812bfbe6f9 Show Select.values more prominently in the documentation 2021-07-01 20:33:57 -04:00
d001b9d0ee [docs] Fix more references
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-07-01 07:48:37 -04:00
47f2d04940 Allow passing Emoji in components 2021-06-02 05:30:42 -04:00
7c40e83d10 Ensure views added to Client.add_view are persistent views 2021-05-31 23:08:08 -04:00
09f0ed1fba Mention that rows are explicitly 0 indexed. 2021-05-31 20:19:08 -04:00
1b15772671 Allow assigning Select.options to refresh the select menu 2021-05-30 03:20:29 -04:00