Created
August 1, 2014 04:53
-
-
Save fabiocerqueira/1b5a14420a46098af7d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from wabot import WabotApp, reply | |
| app = WabotApp() | |
| @app.handler('group_message', command='!info') | |
| @app.handler('private_message', command='!info') | |
| def info(message, params): | |
| reply("I'm wabot. Your parameter is: %s" % str(params)) | |
| if __name__ == '__main__': | |
| bot_phone = os.environ.get("BOT_PHONE", "") | |
| password = os.environ.get("BOT_PASSWORD", "") | |
| wa = app.run(bot_phone, password) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from wabot import WabotApp, reply | |
| app = WabotApp() | |
| @app.handler('private_message') | |
| def echo(message): | |
| reply(message.content) | |
| if __name__ == '__main__': | |
| bot_phone = os.environ.get("BOT_PHONE", "") | |
| password = os.environ.get("BOT_PASSWORD", "") | |
| wa = app.run(bot_phone, password) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment