0.0.44 • Published 7 months ago

miso-npm-publish-test v0.0.44

Weekly downloads
3
License
MIT
Repository
-
Last release
7 months ago

LINE Bot Notify

English | 日本語

A library for easily sending push notifications to LINE Bot

Install

npm install linebot-notify

Usage

Create an instance by passing the LINE Bot channel access token as an argument.
Then simply execute the push method with any message as an argument.
Returns the remaining number of available pushes as the return value.

import { LineBotNotify } from "linebot-notify"

const main = async () => {
	const notify = new LineBotNotify({ channelAccessToken })
	const remainingQuota = await notify.push("LINE Bot Notify!")
	console.log(remainingQuota)
}
main()

Constructor

Specify either a channel access token or a pair of channel ID and channel secret.

// Specify channel access token
const notify = new LineBotNotify({ channelAccessToken })

// Specify channel ID and channel secret
const notify = new LineBotNotify({ channelId, channelSecret })

push(message, { to, notificationDisabled })

Optional parameters can be specified in addition to the message.

ParameterRequiredTypeDefaultDescription
messagestring-Specifies the message to send.
tostring | string[]undefinedSpecifies the recipient(s).For single recipient, specify a user ID or group ID. For multiple recipients, specify an array of user IDs.
notificationDisabledbooleanfalseWhen set to true, notifications will not be sent when sending messages.
// Send a message (broadcast)
await notify.push("LINE Bot Notify!")

// Send a message to a specific user or group
await notify.push("LINE Bot Notify!", { to: "<User ID or Group ID>" })

// Send a message to multiple users (multicast)
await notify.push("LINE Bot Notify!", { to: ["<User ID>", "<User ID>"] })

// Send a message without notifications
await notify.push("LINE Bot Notify!", { notificationDisabled: true })

ライセンス

MIT

0.0.42

7 months ago

0.0.43

7 months ago

0.0.44

7 months ago

0.0.41

1 year ago

0.0.40

2 years ago

0.0.39

2 years ago

0.0.25

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.36

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago