Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
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
  • Socket score

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc