module Rubirai

Rubirai is a library for connecting Mirai http api.

@!method self.AtMessage(**kwargs)

Form an {Rubirai::AtMessage}. The `display` option has no effect when
sending at messages.
@option kwargs [Integer] :target the target id
@return [Rubirai::AtMessage] the message object
@see Rubirai::AtMessage.from

@!method self.QuoteMessage(**kwargs)

Form a {Rubirai::QuoteMessage}.
@return [Rubirai::QuoteMessage] the message object
@see Rubirai::QuoteMessage.from

@!method self.AtAllMessage()

Form an {Rubirai::AtAllMessage}.
@return [Rubirai::AtAllMessage] the message object
@see Rubirai::AtAllMessage.from

@!method self.FaceMessage(**kwargs)

Form a {Rubirai::FaceMessage}. Only needs to give one of the two arguments.
@option kwargs [Integer] :face_id the face id (high priority)
@option kwargs [String] :name the face's name (low priority)
@return [Rubirai::FaceMessage] the message object
@see Rubirai::FaceMessage.from

@!method self.PlainMessage(**kwargs)

@option kwargs [String] :text the plain text
@return [Rubirai::PlainMessage] the message object
@see Rubirai::PlainMessage.from

@!method self.ImageMessage(**kwargs)

Form an {Rubirai::ImageMessage}. Only needs to give one of the three arguments.
@option kwargs [String] :image_id the image id
@option kwargs [String] :url the url of the image
@option kwargs [String] :path the local path of the image
@return [Rubirai::ImageMessage] the message object
@see Rubirai::ImageMessage.from

@!method self.FlashImageMessage(**kwargs)

Form a {Rubirai::FlashImageMessage}. Only needs to give one of the three arguments.
@option kwargs [String] :image_id the image id
@option kwargs [String] :url the url of the image
@option kwargs [String] :path the local path of the image
@return [Rubirai::FlashImageMessage] the message object
@see Rubirai::FlashImageMessage.from

@!method self.VoiceMessage(**kwargs)

Form a {Rubirai::VoiceMessage}. Only needs to give one of the three arguments.
@option kwargs [String] :voice_id the voice id
@option kwargs [String] :url the url of the voice
@option kwargs [String] :path the local path of the voice
@return [Rubirai::VoiceMessage] the message object
@see Rubirai::VoiceMessage.from

@!method self.XmlMessage(**kwargs)

Form a {Rubirai::XmlMessage}.
@option kwargs [String] :xml the xml body
@return [Rubirai::XmlMessage] the message object
@see Rubirai::XmlMessage.from

@!method self.JsonMessage(**kwargs)

Form a {Rubirai::JsonMessage}.
@option kwargs [String] :json the json body
@return [Rubirai::JsonMessage] the message object
@see Rubirai::JsonMessage.from

@!method self.AppMessage(**kwargs)

Form an {Rubirai::AppMessage}.
@option kwargs [String] :content the app body
@return [Rubirai::AppMessage] the message object
@see Rubirai::AppMessage.from

@!method self.PokeMessage(**kwargs)

Form a {Rubirai::PokeMessage}.
@option kwargs [String] :name the poke name
@return [Rubirai::PokeMessage] the message object
@see Rubirai::PokeMessage.from

Constants

MIRAI_API_VERSION

mirai-api-http version

RETURN_CODE

The return codes and their explanations

VERSION

Rubirai version

Public Class Methods

Message(obj, bot = nil) click to toggle source

{include:Rubirai::Message.to_message} @param obj [Message, Hash{String => Object}, Object] the object @return [Message] the message @see Rubirai::Message.to_message

# File lib/rubirai/messages/message.rb, line 207
def self.Message(obj, bot = nil)
  Message.to_message obj, bot
end
MessageChain(*messages, bot: nil) click to toggle source

Makes a message chain. See {MessageChain#make}.

@return [MessageChain] the message chain made. @see MessageChain#make

# File lib/rubirai/messages/message_chain.rb, line 142
def self.MessageChain(*messages, bot: nil)
  MessageChain.make(*messages, bot: bot)
end