Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

Davide95/telegram-integration-dialogflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages