Repository navigation
Releases
Releases · getkirby/discord
1.3.0
🎉 Features
- New
timeoutparameter: the number of seconds to wait for Discord's answer:
Discord::submit(
webhook: option('discord.webhook'),
title: 'New sign-up',
timeout: 3
);🐛 Bug fixes
- Parameters without content are left out of the request
- Texts longer than Discord allows are shortened and end with
…. - Fields without a value are skipped, as Discord rejects them.
- Mentions in
content, like@everyone,@hereor<@user-id>, no longer ping anyone.
1.2.0
🎉 Features
- Support for Kirby 5 and 6
- Support for PHP 8.5
- New
Author::gravatar()helper to use a Gravatar image as the author icon
use Kirby\Discord\Author;
use Kirby\Discord\Discord;
Discord::submit(
webhook: option('discord.webhook'),
title: 'New comment',
author: [
'name' => $user->name()->value(),
'icon' => Author::gravatar($user->email(), 'mp')
]
);⚠️ Requirements
- PHP 8.3, 8.4 or 8.5. Support for PHP 8.1 and 8.2 has been dropped.
- Kirby 4, 5 or 6
🐛 Bug fixes
DateTimeobjects passed astimestampare now converted to UTC.Field::from()no longer declaresnullas a possible return type, as it always returns a field.
🧹 Housekeeping
- Sends the request with
Remote::request()instead of the magicRemote::post() - Tests now use PHPUnit instead of Pest
- Code style is checked with
getkirby/php-cs - Static analysis runs on Psalm 6 at its strictest level, all run through cpx.
- PHPMD has been dropped.
- CI tests PHP 8.3, 8.4 and 8.5 and uses pinned GitHub Actions
- The release ZIP no longer includes
.editorconfig
1.1.0
🎉 Features
- New
dryrunoption to return the sent data as array. This is perfect to debug what is going to be sent to Discord's API.
$response = Discord::submit(
webhook: 'https://discord.com/api/webhooks/xxx/xxx',
image: 'https://example.com/image.jpg',
dryrun: true
);- Support for missing params:
contentthumbnailtimestamp
🐛 Bug fixes
- Fixed support for fields
♻️ Refactored
- Sorted optional params and output arrays alphabetically
🧹Housekeeping
- Added unit tests and code quality checks
- CI setup
- Improved readme
- Added version number to composer.json to display it in the plugins table of the Panel.