repository(ReportRepository::class); $handler = $reportRepo->getReportHandler($report->content_type, true); $service = \XF::service('RomhackPlaza\Master:Discord\BotService'); $service->createAction('report_message', [ 'content_title' => $handler->getContentTitle( $report ), 'report_message' => $report->Comments->last()->message, 'report_manage_url' => \XF::app()->router('public')->buildLink('canonical:reports', $report ), 'report_username' => $report->User?->username ?? "Unknown user", 'report_user_url' => \XF::app()->router('public')->buildLink('canonical:members', $report->User ), 'content_type' => $report->content_type, 'content_link' => $handler->getContentLink( $report ) ]); }); } return $report; } }