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-room-welcome

v0.0.1

Published

Welcome to the room

Downloads

3

Readme

wechaty-room-welcome

Wechaty Plugin Contrib Powered by Wechaty

Welcome to the room

加入房间欢迎

开始

简介

这是一个及其简单的插件,功能也只有一个,那就是用于监听群聊中新人员的加入,随后回复一个入群欢迎,可管理多个群聊

安装

npm install wechaty-room-welcome

or

yarn add wechaty-room-welcome

使用

const WechatyRoomWelcome = require("wechaty-room-welcome")

bot.use(WechatyRoomWelcome(options))

options 参数是一个对象,只有一个属性 reply

| Options 参数属性 | 类型 | 简介 | | ---------------- | ------------- | ------------------------------------------------------------ | | reply | String|Array | reply参数为字符串时,机器人加入的所有群聊监听到新的加入都将回复此欢迎语,当为数组时,可自由配置管理的每个群聊要回复什么欢迎语,为数组类型的具体配置请看下文示例 |

reply 数组格式示例

reply: [
  {
    // 群聊名
    name: "微信机器人",
    // 群聊id
    roomId: "24661539197@chatroom",
    // 入群回复的欢迎词
    reply: `\n 你好,欢迎你的加入,请自觉遵守群规则,文明交流,最后,请向大家介绍你自己!😊`,
  },
	...
]

示例

const { Wechaty } = require("wechaty")
const { PuppetPadplus } = require("wechaty-puppet-padplus")
const Qrterminal = require("qrcode-terminal")
const WechatyRoomWelcome = require("wechaty-room-welcome")

// 初始化 bot
const bot = new Wechaty({
  puppet: new PuppetPadplus({
    // 机器人padplus协议token
    token: PUPPET_PADPLUS_TOKEN,
  }),
  // 机器人名字
  name: ROBOT_NAME,
})

const options = {
  reply: [
    {
      name: "Web圈0x01",
      roomId: "10614174865@chatroom",
      reply: `\n 你好,欢迎你的加入,请自觉遵守群规则,文明交流,最后,请向大家介绍你自己! 😊`,
    },
    {
      name: "Web圈0x02",
      roomId: "22825376327@chatroom",
      reply: `\n 你好,欢迎你的加入,请自觉遵守群规则,文明交流,最后,请向大家介绍你自己!😊`,
    },
    {
      name: "每日算法",
      roomId: "21705489152@chatroom",
      reply: `\n 你好,欢迎你的加入,请自觉遵守群规则,文明交流,最后,请向大家介绍你自己!😊`,
    },
    {
      name: "微信机器人",
      roomId: "24661539197@chatroom",
      reply: `\n 你好,欢迎你的加入,请自觉遵守群规则,文明交流,最后,请向大家介绍你自己!😊`,
    },
    {
      name: "男神开门群",
      roomId: "22275855499@chatroom",
      reply: "男神你好,欢迎加入",
    },
  ],
}

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

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

最后

扫描二维码,加圈子微信备注加群,可进交流群哦,赶快来试试体验一波吧