Skip to content

Releases

1.3.0

Choose a tag to compare

@distantnative distantnative released this 23 Oct 19:48
11c7810

🎉 Features

  • New timeout parameter: 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, @here or <@user-id>, no longer ping anyone.

1.2.0

Choose a tag to compare

@distantnative distantnative released this 23 Oct 19:27
34ef63c

🎉 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

  • DateTime objects passed as timestamp are now converted to UTC.
  • Field::from() no longer declares null as a possible return type, as it always returns a field.

🧹 Housekeeping

  • Sends the request with Remote::request() instead of the magic Remote::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

Choose a tag to compare

@bastianallgeier bastianallgeier released this 17 Jan 12:53
843f2ac

🎉 Features

  • New dryrun option 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:
    • content
    • thumbnail
    • timestamp

🐛 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.

1.0.0

Choose a tag to compare

@bastianallgeier bastianallgeier released this 16 Jan 14:18
24ed9e5

First release 🔥