Skip to content

brujie/wechaty-room-forward

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

wechaty-room-forward

Powered by Wechaty Wechaty开源激励计划 Wechaty Contributor Program

将所在群聊@到自己的消息转发到小号,一个很简单的插件,会监听你所有群聊房间中提到自己的消息进行转发

Installation

npm install wechaty-room-forward

Usage

const wechatyRoomForward = require("wechaty-room-forward")

const options = {
    botName:'botName',
  	bossName: 'bossName'
}

bot.use(wechatyRoomForward(options))

Completely

const { Wechaty } = require("wechaty");
const { PuppetPadlocal } = require("wechaty-puppet-padlocal");
const Qrterminal = require("qrcode-terminal")
// 插件 wechatyRoomForward
const wechatyRoomForward = require("wechaty-room-forward")

// 初始化 bot
const bot = new Wechaty({
  puppet: new PuppetPadlocal({
    // PUPPET_PADLOCAL_TOKEN TOKEN
    token: 'PUPPET_PADLOCAL_TOKEN',
  }),
})

// 插件参数配置
const options = {
  // 机器人微信昵称
  botName:"蔚蓝",
  // 接收人微信昵称
  bossName: ':)'
}

// 使用插件
bot.use(wechatyRoomForward(options));

bot
  .on("scan", (qrcode, status) => {
	  const qrcodeImageUrl = ["https://api.qrserver.com/v1/create-qr-code/?data=",encodeURIComponent(qrcode),].join("");
    console.log(qrcodeImageUrl)
    Qrterminal.generate(qrcode)
  })
  .start()

Test

npm run dev

插件地址

About

wechaty群聊提到自己的消息转发插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published