text_message import TextMessage import logging from viberbot. messages import VideoMessage from viberbot. bot_configuration import BotConfiguration from viberbot. Let's add it all up and reply with a message!įrom flask import Flask, request, Response from viberbot import Api from viberbot. ![]() Have you noticed how we created the TextMessage? There's a all bunch of message types you should get familiar with.Ĭreating them is easy! Every message object has it's own unique constructor corresponding to it's API implementation, click on them to see it!Ĭheck out the full API documentation for more advanced uses. # creation of video message video_message = VideoMessage( media = "", size = 4324) # creation of picture message picture_message = PictureMessage( text = "Check this", media = "") # creation of contact message contact = Contact( name = "Viber user", phone_number = "0123456789")Ĭontact_message = ContactMessage( contact = contact) contact import Contact # creation of text message text_message = TextMessage( text = "sample text message!") We are using pytest, so if you want to run the tests from the commandline just follow the relevant steps after cloning the repo and creating your branch:įrom viberbot. Please make sure that your change doesn't break anything and all the unit tests passes.Īlso, please make sure that the current tests cover your change, if not please add tests. If you think that there's a bug or there's anything else needed to be changed and you want to change it yourself, you can always create a new Pull request. Read our blog post on how to test your bot locally. If you deploy on your own custom server, you'll need a trusted (ca.pem) certificate, not self-signed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |