diff --git a/pymessenger/bot.py b/pymessenger/bot.py index 5a7311c..7c659f4 100644 --- a/pymessenger/bot.py +++ b/pymessenger/bot.py @@ -160,6 +160,18 @@ def send_button_message(self, recipient_id, text, buttons, notification_type=Not } }, notification_type) + def send_custom_message(self, recipient_id, payload, notification_type=NotificationType.regular): + """This allows users send custom data to the Messenger API. + This is best for cases where Messenger releases new features + And the PyMessenger team hasn't specifically implemented that feature + Input: + recipient_id: recipient id to send to + payload: dictionary containing raw request payload (requested by Messenger) + Output: + Response from API as + """ + return self.send_message(recipient_id, payload, notification_type) + def send_action(self, recipient_id, action, notification_type=NotificationType.regular): """Send typing indicators or send read receipts to the specified recipient. https://developers.facebook.com/docs/messenger-platform/send-api-reference/sender-actions