You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

dialog-bot-sdk

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dialog-bot-sdk

Python Bot SDK for Dialog Messenger

3.0.8
PyPI
Maintainers
2

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.peer, 'Reply to : ' + str(params.message.text_message.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_async(on_msg)

Keywords

dialog messenger bot sdk

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts