Message

NAME

API::Discord::Message - Represents Discord message

DESCRIPTION

Represents a Discord message in a slightly tidier way than raw JSON. See https://discordapp.com/developers/docs/resources/channel#message-object, unless it moves.

Messages are usually created when the websocket sends us one. Each is associated with a Channel object.

TYPES

JSON fields

See API::Discord::Object for JSON fields discussion

< id channel-id nonce content is-tts mentions-everyone is-pinned webhook-id
    mentions-role-ids type timestamp edited >

Object accessors

See API::Discord::Object for Object properties discussion

< channel author mentions mentions-roles attachments embeds reactions >

METHODS

new

A Message can be constructed by providing any combination of the JSON accessors.

If any of the object accessors are set, the corresponding ID(s) in the JSON set will be set, even if you passed that in too.

This ensures that they will be consistent, at least until you break it on purpose.

addressed Does the API user appear in the mentions array?

add-reaction Provide a string containg the emoji to use. This is either a unicode emoji, or a fully-specified guild-specific emoji of the form $name:$id, e.g. flask:502112742656835604

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.