class Message extends AbstractMessage

A message between players or teams

Methods

string
getContent()

Get the content of the message

getAuthor()

Gets the creator of the message

bool
isMessage()

Find out whether the event is a message and not a generic conversation event (such as a rename or member join)

static Message
sendMessage(int $to, int $from, string $message, string $status = 'visible')

Create a new message

static 
getQueryBuilder()

Get a query builder for messages

Details

at line line 46
string getContent()

Get the content of the message

Return Value

string The message itself

at line line 55
Player getAuthor()

Gets the creator of the message

Return Value

Player An object representing the message's author

at line line 63
bool isMessage()

Find out whether the event is a message and not a generic conversation event (such as a rename or member join)

Return Value

bool

at line line 81
static Message sendMessage(int $to, int $from, string $message, string $status = 'visible')

Create a new message

This method only stores a message in the database (doesn't update the unread count or push live notifications), prefer to use Conversation::sendMessage() instead.

Parameters

int $to The id of the conversation the message is sent to
int $from The ID of the sender
string $message The body of the message
string $status The status of the message - can be 'visible', 'hidden', 'deleted' or 'reported'

Return Value

Message An object that represents the sent message

at line line 95
static getQueryBuilder()

Get a query builder for messages