mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-11-02 12:31:53 +01:00
35 lines
698 B
PHP
35 lines
698 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Events\Admin\Feature;
|
|
|
|
use App\Events\Base\Admin\AdminCreatedEvent;
|
|
use App\Models\Admin\Feature;
|
|
|
|
/**
|
|
* @extends AdminCreatedEvent<Feature>
|
|
*/
|
|
class FeatureCreated extends AdminCreatedEvent
|
|
{
|
|
public function __construct(Feature $feature)
|
|
{
|
|
parent::__construct($feature);
|
|
}
|
|
|
|
public function getModel(): Feature
|
|
{
|
|
return $this->model;
|
|
}
|
|
|
|
protected function getDiscordMessageDescription(): string
|
|
{
|
|
return "Feature '**{$this->getModel()->getName()}**' has been created.";
|
|
}
|
|
|
|
public function shouldSendDiscordMessage(): bool
|
|
{
|
|
return $this->getModel()->isNullScope();
|
|
}
|
|
}
|