Class: Rubirai::VoiceMessage

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

Overview

The voice message type

Instance Attribute Summary collapse

Attributes inherited from Message

#bot, #type

Class Method Summary collapse

Methods inherited from Message

all_types, check_type, #to_h, to_message

Instance Attribute Details

#pathString? (readonly)

Returns the local path of the voice.

Returns:

  • (String, nil)

    the local path of the voice



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

set_message :Voice, :voice_id, :url, :path

#urlString? (readonly)

Returns the url of the voice.

Returns:

  • (String, nil)

    the url of the voice



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

set_message :Voice, :voice_id, :url, :path

#voice_idString? (readonly)

Returns the voice id from mirai.

Returns:

  • (String, nil)

    the voice id from mirai



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

set_message :Voice, :voice_id, :url, :path

Class Method Details

.from(**kwargs) ⇒ Rubirai::VoiceMessage

Form a Rubirai::VoiceMessage. Only needs to give one of the three arguments.

Options Hash (**kwargs):

  • :voice_id (String)

    the voice id

  • :url (String)

    the url of the voice

  • :path (String)

    the local path of the voice

Returns:



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

set_message :Voice, :voice_id, :url, :path