Files
animethemes-server/app/Observers/Discord/DiscordThreadObserver.php
T
2025-12-19 22:04:43 -03:00

32 lines
686 B
PHP

<?php
declare(strict_types=1);
namespace App\Observers\Discord;
use App\Actions\Discord\DiscordThreadAction;
use App\Models\Discord\DiscordThread;
class DiscordThreadObserver
{
/**
* Handle the DiscordThread "updated" event.
*/
public function updated(DiscordThread $thread): void
{
DiscordThreadAction::getHttp()
->put('/thread', $thread->toArray())
->throw();
}
/**
* Handle the DiscordThread "deleted" event.
*/
public function deleted(DiscordThread $thread): void
{
DiscordThreadAction::getHttp()
->delete('/thread', ['id' => $thread->getKey()])
->throw();
}
}