Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How I did create Telegram bot - Roman Senin

101 views

Published on

Elixir Club 8
Peremoga Space, Kyiv
21.10.2017

Published in: Technology
  • Be the first to comment

How I did create Telegram bot - Roman Senin

  1. 1. How i did create telegram bot Senin Roman
  2. 2. https://en.wikipedia.org/wiki/ Chatbot
  3. 3. In Elixir chats, all they talk about is the telegram bot.
  4. 4. Telegram API
  5. 5. Get updates • Webhooks • Long polling
  6. 6. Data types • Update • Message • InlineQuery • CallbackQuery • Keyboard • …
  7. 7. Elixir
  8. 8. • https://github.com/Yawolf/yocingo • https://github.com/agalaframework/agala • https://github.com/zhyu/nadia
  9. 9. Let’s start!
  10. 10. Long Polling
  11. 11. Update
  12. 12. How to process?
  13. 13. Doesn’t matter
  14. 14. 1 update = > 1 process
  15. 15. But i do like this
  16. 16. Match Message
  17. 17. Quote, Unquote
  18. 18. • command • inline_query_command • callback_query • callback_query_command • message - not match message Matcher Macros
  19. 19. • send_message • answer_callback_query • answer_inline_query • send_<Nadia.DataType> Sender Macroses
  20. 20. • kick_chat_member • get_chat_member • get_chat • … Macros Utilities
  21. 21. Be careful
  22. 22. Open Source
  23. 23. mix-newer
 + mix-telegram-template = simple scaffold telegram bot project
  24. 24. https://github.com/Rastopyr/ mix-telegram-template
  25. 25. https://github.com/lubien/ elixir-telegram-bot-boilerplate
  26. 26. #TODO • Independent package with core logic • Mix `gen` tasks • Improve debug • Improve logs
  27. 27. Thank you!

×