Skip to content

Label.set_radio_group() option kwarg typo #3331

Description

@ToothyDev

Summary

This function creates a radio group and passes the kwarg option, when it should be options.

Reproduction Steps

  1. Use the aforementioned Label.set_radio_group() function

Minimal Reproducible Code

Label("abc").set_radio_group(custom_id="abc", options=[discord.RadioGroupOption(label="1", value="1"], discord.RadioGroupOption(label="2", value="2"])

Expected Results

The kwarg is written correctly

Actual Results

It is not

Intents

all

System Information

2.8.1

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have read the Contributing Guidelines.

Additional Context

Traceback (most recent call last):
File "...", line 50, in callback
await modal.setItems()
File "...", line 31, in setItems
Label("Sélection").set_radio_group(
File ".../discord/ui/label.py", line 433, in set_radio_group
radio = RadioGroup(
^^^^^^^^^^^
TypeError: RadioGroup.init() got an unexpected keyword argument 'option'

Image

As per https://discord.com/channels/881207955029110855/1535003514328055949/1535003514328055949

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    • Status
      In Progress

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions