Buttons
Add some basic interactivity
Warning
conversation_start runs the first time a conversation is create or after you wipe the conversation using the “…” menu
main.py
from ugly_bot import *
@export("run_this")
def run_this():
message_send(text="I ran this")
@export("conversation_start")
def fun():
conversation_buttons_show(
buttons=[
Button(
type=ButtonType.BUTTON,
text="Normal Button",
func="run_this"
),
Button(
type=ButtonType.LINK,
text="Link Button",
uri="https://ugly.bot"
),
Button(
type=ButtonType.TEXT,
text="Text Button"
)
]
)
start()
Glossary