-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
| Q | A |
|---|---|
| Bug report? | no |
| Feature request? | yes |
| BC Break report? | no |
| RFC? | yes |
Add a fluent interface to build messages/embeds. Similar to the symfony config-definition builder.
The benefit would be that you can better see how the messages would look like when they're being sent and it makes building complex embeds easier (and cooler) I guess.
Could look something like this:
$builder = new WebhookBuilder();
$builder
->embeds()
->embed()
->title('embed ONE title')
->timestamp(new \DateTime())
->fields()
->field()
->name('field title')
->value('some field value')
->end()
->end()
->end()
->embed()
->title('embed TWO title')
->author()
->name('scrummer')
->iconUrl('https://my.icon.url/icon.jpg')
->end()
-> end()
->end()
;
$builder->send();Reactions are currently unavailable