Templates
It calls a template with extension ".erb" and executes it. There may be just one or a serie of replies.
template(route=String, params=Hash)
template(route=String, params=Hash)Usage
@reply.template "main/menu", { title: "But, I can help you with this" }File Location
bot/templates/main/menu.erbFile Content
<%
@reply.quick_reply(
title,
[
{
title: "Subscribe",
payload: "profile/sign_up"
},
{
title: "Follow US",
payload: :twitter
},
{
title: "Contact US",
payload: :contact_us
}
]
)
%>params argument
params argumentArguments
Name
Description
Template reuse example
Last updated
Was this helpful?