Skip to main content

Using Vorpal with Wechaty

Wechaty Vorpal NPM NPM Version

Extensible Interactive CLI Plugin for Wechaty ChatOps, Powered by Vorpal.

Wechaty Vorpal

Image: rainbow sword

Powered by Wechaty TypeScript

Usage#

import { Wechaty } from 'wechaty'
import { WechatyVorpal } from 'wechaty-vorpal'
import hackerNews from 'vorpal-hacker-news'
const wechaty = new Wechaty()
wechaty.use(
WechatyVorpal({
use: hackerNews,
}),
)
wechaty.start()

See: wechaty-vorpal-contrib for more Wechaty Vorpal Extension CLI for Chatbots.

Demo#

Wechaty Vorpal Hacker News

help

Commands:
help [command...] Provides help for a given command.
exit Exits application.
hacker-news [options] Lists the top stories on hacker news.

help hacker-news

Usage: hacker-news [options]
Lists the top stories on hacker news.
Options:
--help output usage information
-l, --length [amt] Limits the list to a given length.

hacker-news --length 3

Pulling top 3 stories on Hacker News:
1. Discovering Dennis Ritchies Lost Dissertation (org)
93 points by beefhash 3 hours ago | 23 comments
2. Updating the Git protocol for SHA-256 (net)
81 points by chmaynard 14 hours ago | 48 comments
3. Mac OS X Leopard and Xcode on iPad Pro (com)
134 points by tosh 10 hours ago | 28 comments
Last updated on by Leo_chen