visciang / telegram

Telegram library for the Elixir language
MIT License
204 stars 27 forks source link

handle_info in Telegram.ChatBot #154

Closed julienmarie closed 1 year ago

julienmarie commented 1 year ago

Would it be possible to implement the handle_info callback in ChatBot ? Would be pretty useful to be able to update state of conversation based on other event or async processes.

visciang commented 1 year ago

Sure, would you like to start a PR?

I think we can add an optional callback on the behaviour, what do you think?

julienmarie commented 1 year ago

An additional callback would be perfect. I'd gladly make a PR but I would need a little bit of guidance. Your elixir is way more advanced than mine. Trying to wrap my head around the session server

visciang commented 1 year ago

Your are looking in the right place!

Maybe try to get the feeling of how the Telegram.Bot.ChatBot.Chat.Session.Server is started and addressed.

If I can suggest you, then it could be helpful to try to write a test and a bit of docs about the new feature, you will get the feeling of how the clients of the library will use/interact with the feature.

Feel free to ask if you need help or have questions

visciang commented 1 year ago

Done in #157 !

julienmarie commented 1 year ago

Amazing !