Skip to content

LiveHelperChat/discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Bot for Live Helper Chat

This repository helps you set up a Discord bot that can answer questions from documentation, similar to the one in the Live Helper Chat Discord channel.

Demo

Prerequisites, Discord bot

Creating a Discord bot is not within the scope of this repository, but here are some resources to help you:

Integrating with Live Helper Chat

For receiving messages

  • Import lhc/incoming-webhook.json file in Home > System configuration > Incoming webhooks.
  • Change the Identifier field and update Attributes > bot_token (you can see this by clicking "Show integration information").
  • Choose a department for the bot (it's recommended to create a new department specifically for Discord integration).
  • Copy the URL to put in third party Rest API service for later use.

For Sending Messages

  • Import lhc/restp-api.json file in Home > System configuration > Rest API Calls.
  • Import lhc/bot.json file in Bots > Import. During import choose in previous step imported Rest API
  • Create webhook as per screenshot. For those events webhooks should be created.
    • chat.before_auto_responder_msg_saved
    • chat.web_add_msg_admin
    • chat.workflow.canned_message_before_save
    • chat.desktop_client_admin_msg

See image

Running NodeJS server

  • Clone this repository
  • Copy discord/discord-server/.env.default to discord/discord-server/.env
  • Modify variables in the .env file. You'll need to paste the Webhook URL you copied earlier.
  • Build the server with docker-compose up --build to test. Once everything is working, run docker-compose up -d to run it as a service.

About

Discord bot integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published