mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-30 02:28:58 +02:00
* feat: initial commit for feature management * style: fix StyleCI findings * fix(api): prohibit features of nonnull scope from API & fix(admin): wrong translate key * style: fix Static Analysis error
40 lines
797 B
PHP
40 lines
797 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Events\Base\Admin;
|
|
|
|
use App\Constants\Config\ServiceConstants;
|
|
use App\Events\Base\BaseRestoredEvent;
|
|
use Illuminate\Support\Facades\Config;
|
|
|
|
/**
|
|
* Class AdminRestoredEvent.
|
|
*
|
|
* @template TModel of \App\Models\BaseModel
|
|
*
|
|
* @extends BaseRestoredEvent<TModel>
|
|
*/
|
|
abstract class AdminRestoredEvent extends BaseRestoredEvent
|
|
{
|
|
/**
|
|
* Get Discord channel the message will be sent to.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getDiscordChannel(): string
|
|
{
|
|
return Config::get(ServiceConstants::ADMIN_DISCORD_CHANNEL_QUALIFIED);
|
|
}
|
|
|
|
/**
|
|
* Determine if the message should be sent.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function shouldSendDiscordMessage(): bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|