Skip to main content

A collection of Twyla chat message templates

Project description

image image image image

Twyla Chat Templates

A collection of Twyla chat message templates


poetry install twyla-chat-templates


Quick reply buttons
quick_replies = QuickReplies(text="Which kind of chocolate do you prefer?")

# To add up to ten quick reply buttons:
quick_replies.add(QuickReply(title="Dark", payload="dark_chocolate"))
Postback and URL Buttons
buttons = Buttons(text="What is your favourite type of pizza?")

# To add up to three buttons:
        PostBackButton(title="Margherita", payload="x_Margherita_oaWVAeasEK_x"),
        UrlButton(title="Hawaii", url=""),
Generic Template
element = GenericElement(
        subtitle="Cake with cheese",
                title="I want Cheesecake", payload="x_I_want_Cheesecake_gkvMPBXXxO_x"
            UrlButton(title="Cheesecake, please", url=""),
template =  GenericTemplate(elements=[element])
Carousel Template
# To Create a vertically scrollable carousel, add up to 10 elements to the generic template: 
carousel = GenericTemplate(elements=[e1, e2, e3])
Image Template
image = ImageTemplate(url="")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twyla-chat-templates-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page