Class: Rubirai::ImageMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/rubirai/messages/message.rb

Overview

The image message type. Only one out of the three fields is needed to form the message.

Instance Attribute Summary collapse

Attributes inherited from Message

#bot, #type

Method Summary

Methods inherited from Message

AtAllMessage, AtMessage, FaceMessage, PlainMessage, QuoteMessage, all_types, build_from, check_type, get_msg_klass, #initialize, metaclass, set_message, #to_h, to_message

Constructor Details

This class inherits a constructor from Rubirai::Message

Instance Attribute Details

#image_idInteger? (readonly)

Returns the image id from mirai.

Returns:

  • (Integer, nil)

    the image id from mirai



229
# File 'lib/rubirai/messages/message.rb', line 229

set_message :Image, :image_id, :url, :path

#pathString? (readonly)

Returns the local path of the image.

Returns:

  • (String, nil)

    the local path of the image



229
# File 'lib/rubirai/messages/message.rb', line 229

set_message :Image, :image_id, :url, :path

#urlString? (readonly)

Returns the url of the image.

Returns:

  • (String, nil)

    the url of the image



229
# File 'lib/rubirai/messages/message.rb', line 229

set_message :Image, :image_id, :url, :path