mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
6015dcbbbf
* refactor: migration from laravel-enum package to native php enums * style: fix StyleCI findings
35 lines
757 B
PHP
35 lines
757 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Events\Admin\Setting;
|
|
|
|
use App\Enums\Discord\EmbedColor;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use NotificationChannels\Discord\DiscordMessage;
|
|
|
|
/**
|
|
* Class SettingCreated.
|
|
*/
|
|
class SettingCreated extends SettingEvent
|
|
{
|
|
use Dispatchable;
|
|
use SerializesModels;
|
|
|
|
/**
|
|
* Get Discord message payload.
|
|
*
|
|
* @return DiscordMessage
|
|
*/
|
|
public function getDiscordMessage(): DiscordMessage
|
|
{
|
|
$setting = $this->getSetting();
|
|
|
|
return DiscordMessage::create('', [
|
|
'description' => "Setting '**{$setting->getName()}**' has been created.",
|
|
'color' => EmbedColor::GREEN->value,
|
|
]);
|
|
}
|
|
}
|