interface FossabotMessage implements FossabotDataModel (View source)

Fossabot message context data model. This is only present when the custom API request was invoked from a chat message or command. When dispatched from an automated action, such as a timer, this will be null.

Methods

string
__toString()

String representation of the object.

string
toString()

String representation of the object. For complex objects, this would normally be a JSON string.

string
toJson(int $options = 0)

Convert the object to its JSON representation.

from  Jsonable
toArray()

No description

createFromBody(array $body)

Creates a new Fossabot data model instance from a parsed array of API data.

string
id()

Message ID.

string
content()

Message contents.

string
provider()

Message provider (i.e. twitch, etc.).

user()

User who invoked the message.

Details

string __toString()

String representation of the object.

Return Value

string

String representation of the object

string toString()

String representation of the object. For complex objects, this would normally be a JSON string.

Return Value

string

String representation of the object

string toJson(int $options = 0)

Convert the object to its JSON representation.

Parameters

int $options

JSON encode options

Return Value

string

JSON string

toArray()

No description

static FossabotDataModel createFromBody(array $body)

Creates a new Fossabot data model instance from a parsed array of API data.

Parameters

array $body

Parsed API body

Return Value

FossabotDataModel

string id()

Message ID.

Return Value

string

string content()

Message contents.

Return Value

string

string provider()

Message provider (i.e. twitch, etc.).

Return Value

string

FossabotUser user()

User who invoked the message.

Return Value

FossabotUser