Class: Botkit::Message
- Inherits:
-
Object
- Object
- Botkit::Message
- Defined in:
- lib/botkit/message.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#matches ⇒ Object
readonly
Returns the value of attribute matches.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #command? ⇒ Boolean
-
#initialize(text:, raw: {}, channel_id: nil, command: nil, matches: nil, options: {}) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(text:, raw: {}, channel_id: nil, command: nil, matches: nil, options: {}) ⇒ Message
Returns a new instance of Message.
7 8 9 10 11 12 13 14 |
# File 'lib/botkit/message.rb', line 7 def initialize(text:, raw: {}, channel_id: nil, command: nil, matches: nil, options: {}) @text = text @command = command @raw = raw @channel_id = channel_id @options = @matches = matches end |
Instance Attribute Details
#channel_id ⇒ Object (readonly)
Returns the value of attribute channel_id.
5 6 7 |
# File 'lib/botkit/message.rb', line 5 def channel_id @channel_id end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/botkit/message.rb', line 5 def command @command end |
#matches ⇒ Object (readonly)
Returns the value of attribute matches.
5 6 7 |
# File 'lib/botkit/message.rb', line 5 def matches @matches end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/botkit/message.rb', line 5 def @options end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
5 6 7 |
# File 'lib/botkit/message.rb', line 5 def raw @raw end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/botkit/message.rb', line 5 def text @text end |
Instance Method Details
#command? ⇒ Boolean
16 17 18 |
# File 'lib/botkit/message.rb', line 16 def command? command end |