Skip to content
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

🧑‍💻 Create ActionRow/Component Wrapper for Interactions #68

Closed
Log1x opened this issue May 30, 2024 · 1 comment
Closed

🧑‍💻 Create ActionRow/Component Wrapper for Interactions #68

Log1x opened this issue May 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Log1x
Copy link
Member

Log1x commented May 30, 2024

This is something in DiscordPHP that can be improved DX-wise dramatically similar to the message builder.

Current example:

use Discord\Builders\Components\ActionRow;
use Discord\Builders\Components\TextInput;

$interaction->showModal(
    title: 'Hello world',
    components: [
        ActionRow::new()->addComponent(
            TextInput::new('Message', TextInput::STYLE_SHORT, 'message')
                ->setRequired(true)
        ),
    ],
    submit: fn ($interaction) => $this->example($interaction),
);

Ideally we'd move that component stuff into a fluent builder class.

@Log1x Log1x added the enhancement New feature or request label May 30, 2024
@Log1x
Copy link
Member Author

Log1x commented Jun 10, 2024

Done on #88

@Log1x Log1x closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant