-
Notifications
You must be signed in to change notification settings - Fork 28
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
writing send_poll Protocol - help needed. #72
Comments
Hello! That's all you need to do to add a new response, indeed. The DSL functions in For example, afwer the pipe of your issue, you would end with a context with two items in the answers list, one When you return the context at the end of your You can see here where it happens in the dispatcher. https://github.com/rockneurotiko/ex_gram/blob/master/lib/ex_gram/dispatcher.ex#L255 |
Right! I am trying to build middlewares for my specific needs. And Side Question
|
Feel free to submit any PR, I'll try to review it as soon as possible to give feedback and approve it when everything is right 😄 About generating the Responses, I don't think I would like that. I don't want all the methods to have a response, only the ones useful to have a balance between simple and useful client API. Also, some Responses really need custom code (check |
https://github.com/rockneurotiko/ex_gram/blob/master/lib/ex_gram/dsl.ex#L24 What corner case does this method in
I might need to implement similar in |
Hello,
Objective:
To make
send_poll
pipe-able I am trying to make following changes to library.so I want to use it like
context |> answer('anyhting') |> send_poll(id,"question",['1','2'],type:"quiz",correct_option_id: 0)
what I did?
send_poll.ex
protocol implementationresponses
folderSendPoll
asimport alias
indsl.ex
send_poll
function indsl.ex
Where I need help?
answer
Here -- What doesadd_answer
do?I'll create a PR once I get a response from you and sort things out!
The text was updated successfully, but these errors were encountered: