< Back to Module Documentation // View in SVN
NAME
whatbot::Message - Wrapper class for whatbot message passing
SYNOPSIS
use whatbot::Message; my $message = new whatbot::Message ( 'from' => $me, 'to' => 'a_user', 'content' => 'test message' );
DESCRIPTION
whatbot::Message is a container class for incoming and outgoing messages. Each whatbot component, when sending or receiving a message via a whatbot::IO? class will pass these objects, and messages sent through a whatbot::Command is encouraged to use these objects. Messages sent without this class will be converted during the IO transaction.
PUBLIC ACCESSORS
- from
- User or entity the message is from
- to
- User or entity the message is to
- content
- Content of the message
- timestamp
- Timestamp of the message, in unix time.
- is_private
- Boolean (1/0), if the message was private or posted in a public channel.
- is_direct
- Boolean (1/0), if the message called the bot out by name
- me
- String value of the bot's username.
- origin
- Reference to the IO subclass through which this message was from, if it originated from outside whatbot.
INHERITANCE
LICENSE/COPYRIGHT
Be excellent to each other and party on, dudes.