GithubHelp home page GithubHelp logo

quts / funnychatgroup Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 294 KB

A template to create LINE chatbot backend service on Heroku

Home Page: https://line.me/R/ti/p/%40ade0602l

Python 99.68% Shell 0.32%

funnychatgroup's Introduction

Project 2 : Funny Chat Group Bot Template

This is a README documant for English Version, 也有中文版的說明文件
We want to share an easy deployment chatbot script to help others to build a chatbot with their customized content in a short time.
Hopefully, you do not need to write a script but to configure some hidden key by adding config var in Heroku console.

Installation and Usage

  1. [Heroku] Press the button to create a Heroku App, and you will need to log in or register a new Heroku account.
    • Deploy
  2. [Heroku] Fill the information inquired by Heroku to create the App.
    • Fill app name
  3. [Heroku] Take a note for the URL of your Heroku App. It will be something like https://YOUR_HEROKU_APP_NAME.herokuapp.com
  4. [LINE] Log in to your LINE developer account or register one if you do not have.
  5. [LINE] Go to your LINE developer account, and add a new Messaging API service.
  6. [LINE] Fill your Heroku App URL to URL column, disable "Auto-reply messages" and enable "Use webhooks". Addtionally, to enable "Allow bot to join group chats" if you want your bot able to join a chat group.
  7. [LINE] Take a note for the "Channel secret" and "Channel access token".
    • Set variables
    • Set variables
    • Set variables
  8. [Heroku] Go back to Heroku portal, and goto "Setting" and select "Config Variables" by pressing button "Reveal Config Vars".
  9. [Heroku] Add variables for following things,
    • Add "YOUR_CHANNEL_ACCESS_TOKEN" and fill "Channel access token" which you got from LINE Messaging API service portal.
    • Add "YOUR_CHANNEL_SECRET" and fill "Channel secret" which you got from LINE Messaging API service portal.
  10. Now, you can add the chatbot as your LINE friend and start to do some test with limited function. To provide more interest things, you might need a database, please follow below steps to set up a Firebase database. We choose Firebase since we think it is easy to manage.
  11. [Firebase][Optional] Visit following link and log in or register a new account.
  12. [Firebase][Optional] Press "Console" next to your account photo.
  13. [Firebase][Optional] Launch a new project according to instruction of the webpage.
  14. [Firebase][Optional] Click the project and enter project console, and then select "Database". You will see the URL of your database such as https://YOUR_DATA_BASE_NAME.firebaseio.com
  15. [Heroku][Optional] Follow Step 9 to add

Database columns

To Be Edit. Or, you could read code directly to find it out.

Hidden Keys

  • DATABASE_PAGE_RANDOM_PICKED : When match randon pick keyword "抽", chatbot will pick data from this page.
  • YOUR_NAME_OF_THE_BOT : The keywords shows in Help message and return "有人在找<YOUR_NAME_OF_THE_BOT>嗎?" when it be mentioned.
  • WHITE_LIST : Lock the feature "pick" for white listed group only, split by "," for groups into array.

funnychatgroup's People

Contributors

quts avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

natthinee

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.