LabyMod / LabyMod/discord-webhook
[FEATURE] Fluent msg/embed builder interface
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
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();
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by comparing the requested PHP WebhookBuilder shape with the Symfony config-definition builder linked in the issue, then identify the existing message and embed API it must integrate with. Done means a documented fluent builder can construct the illustrated nested messages and embeds and send them through the webhook.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100