Skip to content
Python Bot SDK for Dialog
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
dialog_bot_sdk feat(python): add group stub Jul 4, 2019
.whitesource Initial WhiteSource configuration file Mar 4, 2019
CHANGELOG
LICENSE
README.md
setup_unfilled.py

README.md

Dialog Python Bot SDK

PyPI PyPI - Downloads PyPI - License

Python Bot SDK for Dialog messenger.

Full documentation is available here.

Usage

from dialog_bot_sdk.bot import DialogBot
import grpc
import os


def on_msg(*params):
    bot.messaging.send_message(
        params[0].peer, 'Reply to : ' + str(params[0].message.textMessage.text)
    )


if __name__ == '__main__':
    bot = DialogBot.get_secure_bot(
        os.environ.get('BOT_ENDPOINT'),  # bot endpoint from environment
        grpc.ssl_channel_credentials(), # SSL credentials (empty by default!)
        os.environ.get('BOT_TOKEN')  # bot token from environment
    )

    bot.messaging.on_message(on_msg)
You can’t perform that action at this time.