Skip to content

Kakao Plus Friend Auto Reply Bot Framework for Node.js

License

Notifications You must be signed in to change notification settings

Astro36/plus-friend-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlusFriendBot

Kakao Plus Friend Auto Reply Bot Framework for Node.js

npm npm

ChangeLog

See CHANGELOG

Installation

  • Install with npm:
npm install plus-friend-bot --save
  • Clone the repo:
git clone https://github.com/Astro36/PlusFriendBot.git

Usage

const {
  PlusFriendBot, PlusFriendKeyboard, PlusFriendMessage, PlusFriendResponse,
} = require('plus-friend-bot');

const plusFriendBot = new PlusFriendBot('korean_school_meal_bot', 1234);

plusFriendBot.onStart(new PlusFriendKeyboard('buttons', ['급식 정보', '학교 설정']));
plusFriendBot.onText((userKey, type, content, send) => {
  if (content === '도움말') {
    send(new PlusFriendResponse(new PlusFriendMessage('물어보고 싶은 것 있어?'), new PlusFriendKeyboard('buttons', ['급식 정보', '학교 변경'])));
  }
});

License

PlusFriendBot
Copyright (C) 2017  Astro

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

PlusFriendBot is licensed under the LGPL 3.0.