@wopr-network/wopr-plugin-line
v1.0.0
Published
LINE channel plugin for WOPR using LINE Bot SDK
Downloads
37
Maintainers
Readme
wopr-plugin-line
LINE channel plugin for WOPR using the official LINE Bot SDK.
Features
- LINE Bot SDK integration (webhook-only, no polling)
- Supports text, image, sticker, location, file, video, and audio messages
- DM and group message policies (open, allowlist, disabled)
- Webhook signature validation via channel secret
- Message chunking for long responses (5000 char limit, max 5 per reply)
- Fallback from replyMessage to pushMessage on expired tokens
- Winston structured logging
Installation
wopr plugin install wopr-plugin-lineConfiguration
Set credentials via environment variables:
export LINE_CHANNEL_ACCESS_TOKEN="your-channel-access-token"
export LINE_CHANNEL_SECRET="your-channel-secret"Or configure via wopr configure --plugin line.
Setup
- Go to LINE Developers Console
- Create a Messaging API channel
- Issue a long-lived channel access token
- Copy the channel secret
- Set your webhook URL in the console:
https://yourdomain.com/webhook - Enable "Use webhook"
- Start WOPR:
wopr daemon start
License
MIT
