class Line::Message::Builder::QuickReply

The QuickReply class provides a builder for creating quick reply buttons that can be attached to text messages or flex messages in the LINE Messaging API.

Quick reply buttons appear at the bottom of the chat screen and allow users to quickly respond to messages with predefined actions. They provide a convenient way to guide user interactions without requiring typing.

Quick replies support:

Example: Basic quick reply with message actions

Line::Message::Builder.with do
  text "Choose your favorite:" do
    quick_reply do
      message "Pizza", label: "Pizza"
      message "Sushi", label: "Sushi"
    end
  end
end

Example: Quick reply with postback actions

Line::Message::Builder.with do
  text "What would you like to do?" do
    quick_reply do
      postback "action=order", label: "Place Order", display_text: "I want to order"
      postback "action=track", label: "Track Order"
    end
  end
end

Example: Quick reply with image icons

Line::Message::Builder.with do
  text "Select a category:" do
    quick_reply do
      message "Food", label: "Food", image_url: "https://example.com/food.png"
      message "Drinks", label: "Drinks", image_url: "https://example.com/drinks.png"
    end
  end
end

See also: