Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pymessenger/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dict>
"""
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
Expand Down