Git Product home page Git Product logo

winaibuttasart / linenotify Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6 KB

สร้าง Line notify-bot ได้ง่ายๆ ผ่าน 3 รูปแบบการส่งข้อความ ทั้งข้อความตัวอักษร รูปภาพ หรือสติ๊กเกอร์ ติดตั้ง และใช้งานได้เลย

JavaScript 100.00%

linenotify's Introduction

LINE Notify


  • สร้าง Line notify-bot ได้ง่ายๆ ผ่าน 3 รูปแบบการส่งข้อความ ทั้งข้อความตัวอักษร รูปภาพ หรือสติ๊กเกอร์ ติดตั้ง และใช้งานได้เลย

เตรียมพร้อม


ติดตั้งและใช้งาน

$ npm install

Usage

const config = require('./config/config')
const { sendText, sendPicture, sendSticker } = require('./lineNotify/lineNotify')

// ======================== Test send Text ===========================
let msgText = `\nทะเบียน ฮ 999\nผู้ขับ. รวดเร็ว ปราดเปรี่ยว\nความเร็ว 93 กม./ชม.\nวันเวลา ${new Date()}\nโทร 089-9999999`
// ==== > normal call < ====
sendText(msgText)
// ==== > call with callback < ====
sendText(msgText).then(result => {
    console.log('Result = ', result)
}, err => {
    console.log('sendText err ', err)
})
// ======================== End Test send Text =======================

// ======================== Test send Image ===========================
let msgImage = 'image test'
let imageThumbnail = 'https://i.ytimg.com/vi/YCaGYUIfdy4/maxresdefault.jpg'
let imageFullsize = 'https://i.ytimg.com/vi/YCaGYUIfdy4/maxresdefault.jpg'
sendPicture(msgImage,imageThumbnail,imageFullsize)
// ======================== End Test send Image =======================

// ======================== Test send Sticker =========================
let msgSticker = 'sticker test'
let stickerPackageId = 1
let stickerId = 113
sendSticker(msgSticker, stickerPackageId, stickerId)
// ======================== End Test send Sticker =====================

อ้างอิง

Code by NIZE => more on https://github.com/winaibuttasart

linenotify's People

Contributors

winaibuttasart avatar

Watchers

James Cloos 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.