Giter Site home page Giter Site logo

telegram-integration-dialogflow's Introduction

Build Status

telegram-integration-dialogflow

A substitute for the default Telegram integration on Dialogflow that supports advanced features:

  • inline queries;
  • incoming voice messages;

How to use it

Installation

Before running it, you need the right version of the libraries needed.

You have to run pip install -r requirements.txt in the project directory.

Also, if you want to use wit.ai for incoming voice messages, you have to install ffmpeg with libmp3lame codecs.

How to run it

If you want to run the script locally, just type in your terminal:

python3 run.py --TELEGRAM_TOKEN [your token] --DIALOGFLOW_KEY [your key] [optional arguments]

You should consider to create an init script if you want to run it on production.

Arguments

In order to set your bot you will need to pass as arguments:

Argument Required? Description Defaults
--TELEGRAM_TOKEN ✔️ Define Telegram bot Token Mandatory
--DIALOGFLOW_KEY ✔️ Define Dialogflow Key Path Mandatory
--ADMIN_CHAT_ID Define Telegram admin chatIDs []
--WIT_TOKEN Define Wit Token None
--LANG Language of the bot; it follows the rfc1766 specification. en
--log Set logging value DEBUG

If you want telegram notifications every time the script will be shut down / turned up you need to set the ADMIN_CHAT_ID. You can set the ADMIN_CHAT_ID with multiple arguments, for example: --ADMIN_CHAT_ID 12345 54321.
You can also change the log level: consider using INFO in production and DEBUG for debugging purposes.

How to contribute

Before submitting new pull requests, ensure that your code follows the PEP 8 style guide and run pylint3 to find bad practices.

It is recommended to sign every commit with your PGP key, if you have one.

telegram-integration-dialogflow's People

Contributors

davide95 avatar fedelodo avatar horrific avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.