mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
33 lines
756 B
PHP
33 lines
756 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Events\Base\List;
|
|
|
|
use App\Constants\Config\ServiceConstants;
|
|
use App\Events\Base\BaseUpdatedEvent;
|
|
use Illuminate\Support\Facades\Config;
|
|
|
|
/**
|
|
* @template TModel of \App\Models\BaseModel
|
|
*
|
|
* @extends BaseUpdatedEvent<TModel>
|
|
*/
|
|
abstract class ListUpdatedEvent extends BaseUpdatedEvent
|
|
{
|
|
public function getDiscordChannel(): string
|
|
{
|
|
return Config::get(ServiceConstants::ADMIN_DISCORD_CHANNEL_QUALIFIED);
|
|
}
|
|
|
|
public function shouldSendDiscordMessage(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected function getDiscordMessageDescription(): string
|
|
{
|
|
return "{$this->privateLabel($this->getModel())} '**{$this->getModel()->getName()}**' has been updated.";
|
|
}
|
|
}
|