Skip to content

feat: components v2 #2707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 162 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 148 commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
714b2f6
base types and flags
NeloBlivion Feb 6, 2025
468f996
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2025
905b9ff
textdisplayComponent
NeloBlivion Feb 6, 2025
49080e7
more
NeloBlivion Feb 6, 2025
e3e7aba
Section, TextDisplay
NeloBlivion Feb 6, 2025
e961db5
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2025
947890d
remaining classes
NeloBlivion Feb 6, 2025
6e7dde9
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2025
d18a9c4
basic view support start
NeloBlivion Feb 6, 2025
5ab45fd
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2025
fb8d13d
flag clarification
NeloBlivion Feb 6, 2025
65dc63d
complete models
NeloBlivion Feb 7, 2025
f86f707
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 7, 2025
1cced5a
Merge branch 'master' into components-v2
NeloBlivion Feb 7, 2025
3e03e84
fix
NeloBlivion Feb 7, 2025
0f8c20a
fix2
NeloBlivion Feb 7, 2025
bf60ffc
update loading_state
NeloBlivion Feb 9, 2025
5080ff7
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 9, 2025
ecd5109
Merge branch 'master' into components-v2
Lulalaby Feb 18, 2025
813812e
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2025
e2e2a71
Merge branch 'master' into components-v2
Lulalaby Feb 19, 2025
cc1bb07
Merge branch 'master' into components-v2
NeloBlivion Feb 22, 2025
066d8ca
finish section fr fr
NeloBlivion Feb 22, 2025
a054ecf
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
8c568ad
small docs
NeloBlivion Feb 22, 2025
6b440f4
section import
NeloBlivion Feb 22, 2025
bce9af3
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
61dd2c9
construct id
NeloBlivion Feb 22, 2025
00eeaa2
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
9de5041
id...?
NeloBlivion Feb 22, 2025
3bd4b5b
bound
NeloBlivion Feb 22, 2025
f890a01
accessory fix
NeloBlivion Feb 22, 2025
6bf9cc0
once more
NeloBlivion Feb 22, 2025
30e2902
flags and with_components
NeloBlivion Feb 22, 2025
9009ca1
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
25deb22
TextDisplay
NeloBlivion Feb 22, 2025
bbe4f1d
fix
NeloBlivion Feb 22, 2025
48fc1c6
fix type
NeloBlivion Feb 22, 2025
f643b5e
imports :(
NeloBlivion Feb 22, 2025
605beb5
v2 view parsing
NeloBlivion Feb 22, 2025
3bb966c
patch underlying
NeloBlivion Feb 22, 2025
cccca77
set_text
NeloBlivion Feb 22, 2025
429f658
fix
NeloBlivion Feb 22, 2025
75e0b3d
underlying raghhhh
NeloBlivion Feb 22, 2025
4198e00
bypass tuple
NeloBlivion Feb 22, 2025
40b1a79
attempt v1-v2 compatability
NeloBlivion Feb 22, 2025
1018de2
i hate groupby
NeloBlivion Feb 22, 2025
5256726
Thumbnail
NeloBlivion Feb 22, 2025
aebf510
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
a6516cc
minor fixes
NeloBlivion Feb 22, 2025
661a2a4
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
4bf9bfe
state?
NeloBlivion Feb 23, 2025
31af377
rough state support on received components
NeloBlivion Feb 23, 2025
403b34f
thumbnail too
NeloBlivion Feb 23, 2025
835138a
fix states
NeloBlivion Feb 23, 2025
5e45569
adjust with_components defaults
NeloBlivion Feb 23, 2025
4fd6fe7
MediaGallery
NeloBlivion Feb 23, 2025
11f30c5
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 23, 2025
a883573
gallery fixes
NeloBlivion Feb 23, 2025
0faeab8
append
NeloBlivion Feb 23, 2025
554b4b8
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 23, 2025
6f133e0
notuple
NeloBlivion Feb 23, 2025
1c30853
Update discord/ui/section.py
NeloBlivion Feb 23, 2025
40dbb8c
Update discord/ui/section.py
NeloBlivion Feb 23, 2025
f9096a9
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 23, 2025
0be3e31
file
NeloBlivion Feb 27, 2025
044a052
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 27, 2025
8fd981d
Update discord/ui/view.py
Lulalaby Feb 27, 2025
032fb00
Separator
NeloBlivion Feb 27, 2025
ea29f72
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 27, 2025
88c65fb
Merge branch 'master' into components-v2
Lulalaby Feb 27, 2025
a9671ae
container
NeloBlivion Feb 27, 2025
6c9f3ee
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 27, 2025
85c15d4
nobreak
NeloBlivion Feb 27, 2025
cb2ec4c
docs
NeloBlivion Feb 27, 2025
09627f1
int with_components
NeloBlivion Feb 27, 2025
86246a2
container
NeloBlivion Feb 27, 2025
11ac9da
require accessory
NeloBlivion Feb 27, 2025
4bd1647
int
NeloBlivion Feb 27, 2025
04d748a
sep
NeloBlivion Feb 27, 2025
69badd8
fix separator
NeloBlivion Feb 28, 2025
f6938d7
fix file
NeloBlivion Feb 28, 2025
7e94257
handle actionrow in container
NeloBlivion Feb 28, 2025
7daff7d
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
b963d51
neater fix
NeloBlivion Feb 28, 2025
b5cca60
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
e64f0b4
maybe?
NeloBlivion Feb 28, 2025
222b504
actual file fix
NeloBlivion Feb 28, 2025
55aa2af
handle ui.File from_component case
NeloBlivion Feb 28, 2025
87ac602
decorator support?
NeloBlivion Feb 28, 2025
5d76987
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
4acac2b
setter
NeloBlivion Feb 28, 2025
b07825b
swap
NeloBlivion Feb 28, 2025
5608013
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
dd2c16f
silly code thank u plun
NeloBlivion Feb 28, 2025
1d56b9b
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
e0b53ae
decorator in section
NeloBlivion Feb 28, 2025
8ea9d3f
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
d1a3711
imports
NeloBlivion Feb 28, 2025
505d431
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
64a8223
extend weight
NeloBlivion Feb 28, 2025
45271d8
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 28, 2025
a2490f6
subitem
NeloBlivion Feb 28, 2025
5d6f529
meh
NeloBlivion Mar 1, 2025
abfa1e6
full ID support and general cleanup
NeloBlivion Mar 1, 2025
5744198
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 1, 2025
2ec1256
doc
NeloBlivion Mar 1, 2025
02e65c1
Merge branch 'master' into components-v2
NeloBlivion Mar 3, 2025
3c9278d
Merge branch 'master' into components-v2
NeloBlivion Apr 18, 2025
2ef567f
adjust container item strategy
NeloBlivion Apr 18, 2025
0c97a21
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 18, 2025
16f4c35
import get
NeloBlivion Apr 18, 2025
80499bb
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 18, 2025
6857299
extend to section
NeloBlivion Apr 18, 2025
15248c5
implement copy_text
NeloBlivion Apr 18, 2025
e7c2399
get
NeloBlivion Apr 18, 2025
b63e224
minor fix
NeloBlivion Apr 18, 2025
f21a4b8
get_item works on nested items
NeloBlivion Apr 18, 2025
97962f0
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 18, 2025
567858f
recur in container
NeloBlivion Apr 18, 2025
492f70b
id
NeloBlivion Apr 18, 2025
338f8cf
media view setter
NeloBlivion Apr 19, 2025
c7c911e
dispatch
NeloBlivion Apr 19, 2025
6dd7a2c
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 19, 2025
9ba1f84
maybe fixes
NeloBlivion Apr 19, 2025
09f4e27
Update discord/ui/section.py
NeloBlivion Apr 20, 2025
5ab9dcd
Update discord/ui/container.py
NeloBlivion Apr 20, 2025
c7740b3
Update discord/ui/section.py
NeloBlivion Apr 20, 2025
e87a2d1
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 20, 2025
96c5792
adjust get_item behavior
NeloBlivion Apr 20, 2025
1314b9e
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 20, 2025
28bfe5d
typing adjustment
NeloBlivion Apr 20, 2025
397acf7
another adjustment
NeloBlivion Apr 20, 2025
64df149
doc clarification
NeloBlivion Apr 20, 2025
94844e2
fix awkward decorator behavior
NeloBlivion Apr 20, 2025
05c8e86
self
NeloBlivion Apr 20, 2025
b7fe616
add Section.set_thumbnail shortcut
NeloBlivion Apr 22, 2025
d39b31c
add kwargs
NeloBlivion Apr 22, 2025
794acf8
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 22, 2025
7e2f8ef
basic paginator support
NeloBlivion Apr 22, 2025
9acbcc0
Update discord/ui/item.py
NeloBlivion Apr 23, 2025
a09b8ce
rough example
NeloBlivion Apr 23, 2025
4dee8de
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 23, 2025
0d1e695
Apply suggestions from code review
NeloBlivion Apr 23, 2025
19e2f9f
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 23, 2025
d3b78aa
Apply suggestions from code review
plun1331 Apr 23, 2025
8befa8b
adjust copy_text and fix example
NeloBlivion Apr 23, 2025
a1b7ed4
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 23, 2025
6cfa8cc
disable_all_items and enable_all_items
NeloBlivion Apr 24, 2025
9c591c6
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 24, 2025
b624930
VAR
NeloBlivion Apr 24, 2025
7778210
remove_item qol
NeloBlivion Apr 24, 2025
0f3e7cd
brackets
NeloBlivion Apr 24, 2025
29c1d40
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 24, 2025
98a9bc5
Update discord/ui/view.py
NeloBlivion Apr 24, 2025
45fe45e
Update discord/components.py
NeloBlivion Apr 24, 2025
7c2d96d
textdisplay limits
NeloBlivion Apr 25, 2025
bd17372
Merge branch 'master' into components-v2
NeloBlivion Apr 26, 2025
1c54b08
Update discord/components.py
NeloBlivion Apr 26, 2025
2adca36
style(pre-commit): auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2025
2ee8c01
Update discord/components.py
NeloBlivion Apr 26, 2025
6296f72
chaining support
NeloBlivion Apr 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,8 @@ async def send(
)

components = view.to_components()
if view.is_components_v2():
flags.is_components_v2 = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add an error here if content or embeds are provided, because some of the discord errors aren't very clear

else:
components = None

Expand Down
Loading