In my journey to make Laravel backup Notifications work, I found some difficulties making a BackupHasFailedNotification display on Discord. Always returning 400 - Bad request.
- Embed titles are limited to 256 characters
- Embed descriptions are limited to 4096 characters
- There can be up to 25 fields
- A field's name is limited to 256 characters and its value to 1024 characters
- The footer text is limited to 2048 characters
- The author name is limited to 256 characters
- The sum of all characters from all embed structures in a message must not exceed 6000 characters
- 10 embeds can be sent per message
And that's right, when a BackupHasFailedNotification is called, the fieldsname parameter is way larger than 1024 causing it to return Bad Request like indicated in the docs.
After some tweaks in DiscordMessage class it runs as expected.
In my journey to make Laravel backup Notifications work, I found some difficulties making a
BackupHasFailedNotification
display on Discord. Always returning400 - Bad request
.I finally found out Discord Embed Limits :
And that's right, when a
BackupHasFailedNotification
is called, thefields
name
parameter is way larger than 1024 causing it to returnBad Request
like indicated in the docs.After some tweaks in
DiscordMessage
class it runs as expected.This is what I did :
Notifications/Channels/Discord/DiscordMessage.php
I first added the correct limit numbers but it didn't work. I then decided to round the values and it worked.
Should I suggest a PR for this ?