class Line::Message::Builder::Text

The Text class provides a builder for creating simple text messages in the LINE Messaging API. Text messages are the most basic message type, consisting of plain text content with optional quick reply buttons and quote tokens for replying to specific messages.

Text messages support:

Example: Basic text message

Line::Message::Builder.with do
  text "Hello, world!"
end

Example: Text with quick reply

Line::Message::Builder.with do
  text "Choose an option:" do
    quick_reply do
      button action: :message, label: "Yes", text: "I agree"
      button action: :message, label: "No", text: "I disagree"
    end
  end
end

Example: Text with quote token

Line::Message::Builder.with do
  text "This is a reply" do
    quote_token "sample_quote_token_value"
  end
end

The Text builder inherits from Base and can be used within the Line::Message::Builder.with block using the text method.