-
Notifications
You must be signed in to change notification settings - Fork 2
Texts Guide
Moris Doratiotto edited this page Jul 1, 2021
·
1 revision
You can specified the message for every state in a dictionary or in an external file (suggested).
Following, you can find an example for every method supported.
Check out this example: texts.py
Given these simple states:
# states
first = State("first", back_button=False)
another = State("another")
end = State("end")
texts = {
"first": "This is the first message",
"another": "This is another message",
"end": "This is the final message",
}
Conversation(first, state_messages=texts)
Given this JSON file texts.json
:
{
"first": "This is the first message",
"another": "This is another message",
"end": "This is the final message",
}
Conversation(first, state_messages="texts.json")
Given this YAML file texts.yaml
:
first: "This is the first message"
another: "This is another message"
end: "This is the final message"
Conversation(first, state_messages="texts.yaml")
Given this TOML file texts.toml
:
first = "This is the first message"
another = "This is another message"
end = "This is the final message"
Conversation(first, state_messages="texts.toml")