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

✨ Add support for loading existing message into the Message Builder #83

Open
Log1x opened this issue Jun 6, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Log1x
Copy link
Member

Log1x commented Jun 6, 2024

Ideally you'd be able to convert an existing message back to a Builder instance to modify it's content.

I'm thinking ->from() or ->fill() which can be used like:

$this
    ->message()
    ->from($message)
    ->title('New fancy title')
    ->clearButtons()
    ->send($message->channel);
@Log1x Log1x added the enhancement New feature or request label Jun 9, 2024
@mikield
Copy link
Contributor

mikield commented Dec 17, 2024

Can't we just use PHP cloning mechanism?

Someting like

clone $message
        ->title('New fancy title')
        ->clearButtons()
        ->send($message->channel);

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

2 participants