class Ant::Bot::Message

Base implementation for messages from distinct providers

Public Instance Methods

command?() click to toggle source

Returns true when the received message is a command. Convention states that messages should start with '/' to be considered commands

# File lib/ant/bot/message.rb, line 20
def command?
  raw_message.start_with?('/')
end
to_h() click to toggle source

Converts the messages into a hash

# File lib/ant/bot/message.rb, line 11
def to_h
  {
    text: raw_message,
    channel: channel_id
  }
end