class Facebook.handlers.Position[source]

Bases: enum.Enum

Enumerates for the position of the text in text_handler

CONTAINS = 'contains'
END = 'end'
IS = 'is'
START = 'start'
Facebook.handlers.attachment_handler(func)[source]
Facebook.handlers.postback_handler(func)[source]
Facebook.handlers.text_handler(text=None, position=None)[source]

Text handler which runs the decorated function if the message from facebook consists of the text with required position(if passed)

@optional

Parameters:
  • text (str) – text to be searched in the facebook text message.
  • position (enumerate,str) – position of the text in the message.
Returns:

text_handle.

Return type:

callable