Skip to content

this is a wechaty plugin to monitor whether your bot is kicked out of group chat.

License

Notifications You must be signed in to change notification settings

wechaty/wechaty-got-kicked-out

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wechaty-Got-Kicked-Out

Wechaty Plugin Contrib Wechaty Plugin Contrib Build Status

What is this?

this is a wechaty plugin to monitor whether your bot got kicked out of group chat.

just few line of code to implement this instead fussy judging.

Installation

yarn add "wechaty-got-kicked-out"

or

npm install "wechaty-got-kicked-out" --save

Usage

import {Wechaty} from "wechaty"

import {GotKicked} from "wechaty-got-kicked-out"

const bot = new Wechaty({
   name:"wechaty-got-kicked-out"
})

bot.use(GotKicked({
   onKick(room, remover, date){
      console.log(`
         bot just got kick out of ${await room.topic()}[${room.id}]
         by ${remover ? remove.name(): 'it self'} 
         --date:${date}
         `)
   },
   /*
   comming soon... 
   whiltList:{
      id:"19710388933@chatroom"
      // or
      id:["19710388933@chatroom","98345982793@chatroom"]
      // or
      topic:"微信群001"
      // or
      topic:["微信群001","微信群002"]
   }
   */
   
}))

bot.start()
   .catch(console.error)

Test

npm run test

Build

npm run build

Maintainers

Copyright & License

  • Code & Docs © 2020-now LegendaryJesse|Wechaty
  • Code released under the MIT License
  • Docs released under Creative Commons

About

this is a wechaty plugin to monitor whether your bot is kicked out of group chat.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published