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_
070ae24d8d
Document all limits in discord.ui
2024-01-26 20:08:00 -05:00
Ionite
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
Varun J
c26473d0eb
Fix views not being persistent if modifying custom_id after __init__
2022-07-31 04:53:25 -04:00
Lilly Rose Berner
7267d18d9e
Improve component typing
2022-05-16 15:30:03 -04:00
Lilly Rose Berner
7ee15e1d68
Use typing.Literal for channel and component type annotation
2022-04-29 06:07:22 -04:00
Rapptz
e515378076
Remove annotation on row property in subclasses
2022-03-29 23:04:34 -04:00
Rapptz
3215cb65e2
Raise if custom_id is not a str
2022-03-29 23:04:34 -04:00
Rapptz
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
Rapptz
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
Stocker
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
Josh
147948af9b
Use typing.Self throughout library
2022-03-01 07:53:24 -05:00
Josh
d409ddd227
Alter return-type of button/select decorators
2022-02-21 21:54:44 -05:00
Rapptz
097b6064f1
Fix ui.Button constructor default style to match the decorator
2021-07-03 21:29:28 -04:00
Rapptz
9ac459b5d3
Add a default style for buttons
...
This makes it easier to create URL buttons since the library will
automatically assign the proper style for it.
2021-07-01 20:45:38 -04:00
Nadir Chowdhury
abac04b759
Fix link buttons not being regarded as persistent
2021-06-29 20:03:50 -04:00
Josh
233d10649c
[docs] Update Sphinx and Fix various references
...
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-06-27 23:43:49 -04:00
Rapptz
1c640ad72b
Lazily create Button custom_ids in decorator interface
...
The previous code would make two separate instances share the custom_id
which might have been undesirable behaviour
2021-06-12 02:33:11 -04:00
Rapptz
47f2d04940
Allow passing Emoji in components
2021-06-02 05:30:42 -04:00
Rapptz
7c40e83d10
Ensure views added to Client.add_view are persistent views
2021-05-31 23:08:08 -04:00
Rapptz
c811932ca7
Don't mark URL buttons as dispatchable
2021-05-31 22:57:44 -04:00
Rapptz
09f0ed1fba
Mention that rows are explicitly 0 indexed.
2021-05-31 20:19:08 -04:00
Rapptz
7bd1211b36
Rework item grouping behaviour to take into consideration weights
...
This also renames `group` into `row`
2021-05-29 23:58:37 -04:00
Rapptz
ef9f61a933
Add support for select components
2021-05-28 05:34:21 -04:00
Rapptz
6874aa73c4
Add PartialEmoji.from_str helper
2021-05-28 05:34:21 -04:00
Zomatree
6cc3e572ba
Button labels can be None
2021-05-27 22:33:13 -04:00
Rapptz
5e96ad9261
Force button style to link if a URL is passed
2021-05-27 00:53:14 -04:00
Rapptz
eda6680377
Rename enums to use official API naming
2021-05-27 00:53:14 -04:00
Rapptz
ed9badcddf
Make Item and Button generic over the underlying view
2021-05-27 00:53:14 -04:00
Rapptz
4c0ebc9221
Change the way callbacks are defined to allow deriving
...
This should hopefully make these work more consistently as other
functions do.
2021-05-27 00:53:14 -04:00
Rapptz
98570793e4
Add initial support for buttons and components
2021-05-27 00:53:13 -04:00