ReportCreatedEvent
extends AbstractEvent
in package
implements
HasWebhookParams, DiscordDispatchable
Represents a class-based event.
Table of Contents
Interfaces
- HasWebhookParams
- Represents an event which has specific parameters to send to a webhook.
- DiscordDispatchable
- Represents an event which is able to be sent as a Discord embed.
Properties
- $avatar_url : string
- $content : string
- $content_full : string
- $title : string
- $url : string
- $username : string
Methods
- __construct() : mixed
- description() : string
- Get the description of the event.
- internal() : bool
- Determine whether to hide this hook from users in the StaffCP, some events should be private.
- name() : string
- Convert the class name to the event name.
- params() : array<string|int, mixed>
- Get the parameters of the event.
- toDiscordWebhook() : DiscordWebhookBuilder
- Build a Discord webhook to represent the event as a Discord embed.
- webhookParams() : array<string|int, mixed>
Properties
$avatar_url
public
string
$avatar_url
$content
public
string
$content
$content_full
public
string
$content_full
$title
public
string
$title
$url
public
string
$url
$username
public
string
$username
Methods
__construct()
public
__construct(string $username, string $content, string $content_full, string $avatar_url, string $title, string $url) : mixed
Parameters
- $username : string
- $content : string
- $content_full : string
- $avatar_url : string
- $title : string
- $url : string
description()
Get the description of the event.
public
static description() : string
Return values
string —The description of the event
internal()
Determine whether to hide this hook from users in the StaffCP, some events should be private.
public
static internal() : bool
Return values
bool —Whether to hide this hook from users in the StaffCP
name()
Convert the class name to the event name.
public
static name() : string
Example: UserDeletedEvent -> userDeleted.
Return values
string —The name of the subclass, without the "Event" suffix
params()
Get the parameters of the event.
public
final params() : array<string|int, mixed>
Parameters are assumed to be public properties of the event class.
Return values
array<string|int, mixed> —The parameters of the event
toDiscordWebhook()
Build a Discord webhook to represent the event as a Discord embed.
public
toDiscordWebhook() : DiscordWebhookBuilder
Return values
DiscordWebhookBuilder —The webhook builder to send the event as an embed
webhookParams()
public
webhookParams() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array of parameters to send to the webhook