-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Text Quick Replies #76
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, would love to see quick replies implemented
pymessenger/bot.py
Outdated
"title":reply, | ||
"payload":reply | ||
}) | ||
if payload != None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this just be an else
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true. I changed it to an else. Thanks for your suggestion!
pymessenger/bot.py
Outdated
}) | ||
|
||
return self.send_message(recipient_id, { | ||
"text": message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to get this working in a local fork of Pymessenger
, and I'm encountering an error stating that message
from line 422 isn't defined. Should message
be messageToReplyTo
because I don't see that argument being used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sorry about that. I fixed the message to be messageToReplyTo. I also added a default message for the function. I tested the function with whitespace and empty strings, which apparently does not send the quick replies (because it requires a concrete message to reply to).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove redundant if statement and added a default messageToReplyTo
Can I rework this feature? |
Hello, Instead of making an API for this purpose alone I decided to make an API that would allow users manually add their payload themselves. Eradicating issues that may arise with making the API satisfy everyone's individual use case. You can check it out here (#85) |
Hello! I added text quick replies to my version. I have tested it and it works for my situation. I believe there may be some modifications to make it cleaner.
But basically it takes in a list of replies (which the user presses) in response to a text message. There is an optional payload list for the developer and if the developer decides to not use a payload, then the payload is simply the reply.