Artificial Intelligence Discord Bot

in #utopian-io6 years ago (edited)

What is the project about?


This bot is capable of answer any message sent through discord using the '!' command to specify that this message is for the bot. This bot works using the Api.ai which is now known as DialogFlow.

The responses can be trained to any situation such as book a flight, query the weather and so many things. In addition, you can add custom responses for very special cases that you want to respond with a specific answer.

Uses case


This bot can be used to solve situations where human interaction is not needed. For instance:

  • The bot can be configured to book flights
  • The bot can be configured to get the weather without leaving the chat room
  • The bot can be configured to query data from the internet such as definitions
  • The bot can be configured to give information regarding a product and answer questions
  • The bot can be configured to book appointments

Technology behind it


This bot is running thanks to NodeJs as well as the corresponding libraries for the services used in it.

Roadmap


In the future, more examples of the uses case will be added to the code to bring the user a quick start to use this project.

How to run it


Running this bot is very easy. To do so, just run the following command (supposing you are in the root of the project):

AUTH_TOKEN=<your-discord-token> API_AI=<your-api-ai-key> node main.js

And once you see the connected message in the logs, you can start using it right away.

How to contribute?


In order to contribute, developers are required to make a fork of my repo and make a PR (pull request) with the changes made. So, a set of logical steps to so do are the following:

git clone https://github.com/<YOUR-USERNAME>/discord-ai-bot
cd discord-ai-bot
........
git add -A
git commit -m "Changes made"
git push origin master
........
Make a PR to my repo

Quick demo


Here is a GIF recorded in my local environment testing the AI responses of this bot.
discordAiBot.gif



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hello,
could you shortly explain how to install the bot? :)

Your contribution cannot be approved because it does not follow the Utopian Rules.

Simple and common code snippets that can be easily found or reproduced can't be submitted in the development category.

What I can see in the repo is that you are calling APIAI package and then calling it over request and the reponse is send back to the Discord Message. Which is very common I believe.

var request = apiaiApp.textRequest(text, { sessionId: '<any-unique-name>' });

You can contact us on Discord.
[utopian-moderator]

I agree with you. Next time I will do something more complex.

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.032
BTC 66924.38
ETH 3111.57
USDT 1.00
SBD 3.75