npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wechaty-friend-pass

v0.0.2

Published

Wechat friend application passes automatically

Downloads

8

Readme

wechaty-friend-pass

Wechaty Plugin Contrib Powered by Wechaty

Wechat friend application passes automatically

微信好友申请自动通过

开始

简介

你是否想要自己的微信机器人自动通过好友请求,或者设置一些关键字,通过好友申请时备注的关键字来校验是否要自动通过该好友申请,并且通过好友申请时自动回复一段话

如果是的话,那么你可以使用这个插件,虽然是一个很简单的功能但是使用 plugin 可以使我们的代码更简洁

到这里它的功能你应该了解了,那么我们来看看它如何使用

安装

npm install wechaty-friend-pass

or

yarn add wechaty-friend-pass

使用

const WechatyFriendPass = require("wechaty-friend-pass")

bot.use(WechatyFriendPass(options))

如上所示

使用插件只要按需传入配置对象 options 即可

| Options 参数属性 | 类型 | 简介 | | ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | keyword | String|Array | 好友请求时备注自动通过的关键字,只有一个可以使用字符串类型,多个关键字使用数组类型,全部通过不用校验传入字符串 "*" 即可,不传即都不自动通过 | | blackId | String|Array | 用户黑名单 ID,该项可填写用户的 ID 来识别用户,让此用户不被自动通过,也可不填 | | reply | String | 自动通过用户好友申请后自动回复一句话,为空或不填则通过后不回复 |

示例

const { Wechaty } = require("wechaty")
const { PuppetPadplus } = require("wechaty-puppet-padplus")
const Qrterminal = require("qrcode-terminal")
// 引入插件 WechatyFriendPass
const WechatyFriendPass = require("wechaty-friend-pass")

// 初始化 bot
const bot = new Wechaty({
  puppet: new PuppetPadplus({
    token: PUPPET_PADPLUS_TOKEN,
  }),
  name: ROBOT_NAME,
})

// 插件配置对象
const options = {
  keyword: ["加群", "前端", "后端", "全栈"],
  blackId: ["*******", "*******"],
  reply:
    "你好,我是机器人小助手圈子 \n 加入技术交流群请回复【加群】\n 联系小主请回复【123】",
}

// 使用插件
bot.use(WechatyFriendPass(options))

bot
  .on("scan", (qrcode, status) => {
    Qrterminal.generate(qrcode, { small: true })
  })
  .start()

最后

扫描二维码,加圈子微信,进交流群哦,效果如下图,赶快来试试吧