Git Product home page Git Product logo

dfcxdiscord's Introduction

DFCXDiscord

A Dialogflow CX integration with Discord. Write conversational experiences for your Discord server!

Features

  • Tag or reply to your bot in a server to start a conversation, just like a real user
  • Sessions and messages with your bot are stored in Firestore (in Datastore mode) for analytics and debugging
  • Support for passing user variables to the Dialogflow session -- currently the username (authorName) and ID (authorID) of the Discord user engaging with the bot
  • Support for Discord interactive components through custom payloads that conform to the Discord Message Component format. The custom_id field in the selectable items is passed back to the session as an utterance when it's selected, you can capture it with a custom entity.

Installation

  1. git clone and npm install to get the dependencies.

  2. The integration expects a few values to be provided in a .env file:

DISCORD_BOT_TOKEN: The token for the Discord bot you want to use the integration for. (If you'd like instructions for setting up the Discord bot itself, getting the token, and adding it to a server, follow steps 2-4 of these instructions)

GCLOUD_PROJECT: The name of the GCP project containing your Dialogflow agent and Datastore instance.

IAM_KEY_FILE: The path to the IAM keyfile for your GCP project.

DF_AGENT_ID: The ID of the Dialogflow agent you want to connect.

DF_AGENT_LOCATION: The string location you selected for the agent when you created it (us-central1, us-west, etc)

  1. npm start will compile and start. Once your Discord bot is created and added to a server, you should see it come online!

dfcxdiscord's People

Contributors

johndikeman avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.