Response

Response holds a single response for a Conversation.

Responses can also include an action, which should be something callable.

Constructor

Response(text[, action, portrait, sticky]) Response holds a single response for a Conversation.

Methods

launchActions() Launches all actions associated with this response.

Details

class Response(text, action=None, portrait=None, sticky=False)[source]

Bases: object

Constructs a response.

Parameters:
  • text – String indicating the response.
  • action – A function that will be executed with this response.
  • portrait – The portrait to be shown with this response.
  • sticky – If True, this response will not be removed from the response list, meaning it will be repeated over and over untill some other event removes it.

Methods

launchActions()[source]

Launches all actions associated with this response.