-
-
Notifications
You must be signed in to change notification settings - Fork 484
feat: Radio Groups & Checkboxes #3073
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/3073/head:pr-3073
git checkout pr-3073This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3073/head |
Lulalaby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SMH blindly copying
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
|
|
||
| - Added `.extension` attribute to emojis to get their file extension. | ||
| ([#3055](https://github.com/Pycord-Development/pycord/pull/3055)) | ||
| - Added `RadioGroup`, `CheckboxGroup`, & `Checkbox` for modals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Added `RadioGroup`, `CheckboxGroup`, & `Checkbox` for modals. | |
| - Added `RadioGroup`, `CheckboxGroup`, and `Checkbox` for modals. |
| max_values: Optional[:class:`int`] | ||
| The maximum number of options that can be selected. | ||
| required: Optional[:class:`bool`] | ||
| Whether the checkbox group requires a selection or not. Defaults to `True`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Whether the checkbox group requires a selection or not. Defaults to `True`. | |
| Whether the checkbox group requires a selection or not. Defaults to ``True``. |
| options: List[:class:`RadioGroupOption`] | ||
| A list of options that can be selected in this group. | ||
| required: Optional[:class:`bool`] | ||
| Whether the radio group requires a selection or not. Defaults to `True`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Whether the radio group requires a selection or not. Defaults to `True`. | |
| Whether the radio group requires a selection or not. Defaults to ``True``. |
plun1331
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that probably looks okay or something and i might have read all the code im not sure
goodnight
|
U mean I going to sleep now I woke upe 30 mins ago lol |
| self.type = ComponentType.radio_group | ||
| self.id: int | None = data.get("id") | ||
| self.custom_id = data.get("custom_id") | ||
| self.options: list[RadioGroupOption] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really relevant to now specifically, but while going through this I wondered if there's a reason why we don't use list(.map()) instead of a comprehension
| @@ -0,0 +1,115 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyrights
| Parameters | ||
| ---------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Parameters | |
| ---------- | |
| Attributes | |
| ---------- |
Summary
Implements radio groups, checkbox groups, and checkboxes in modals

Alpha server only right now
Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.