https://github.com/wechaty/wechaty-got-kicked-out
this is a wechaty plugin to monitor whether your bot is kicked out of group chat.
https://github.com/wechaty/wechaty-got-kicked-out
Last synced: about 1 year ago
JSON representation
this is a wechaty plugin to monitor whether your bot is kicked out of group chat.
- Host: GitHub
- URL: https://github.com/wechaty/wechaty-got-kicked-out
- Owner: wechaty
- License: mit
- Created: 2020-05-09T06:56:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-29T01:03:03.000Z (about 6 years ago)
- Last Synced: 2025-06-06T10:11:36.544Z (about 1 year ago)
- Language: TypeScript
- Size: 66.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wechaty-Got-Kicked-Out
[](https://github.com/wechaty/wechaty-got-kicked-out)
[](https://github.com/wechaty/wechaty-plugin-contrib#wechaty-plugin-directory)
[](https://travis-ci.org/JesseWeb/wechaty-got-kicked-out)
## 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
```bash
yarn add "wechaty-got-kicked-out"
```
or
```bash
npm install "wechaty-got-kicked-out" --save
```
## Usage
```javascript
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
```bash
npm run test
```
## Build
```bash
npm run build
```
## Maintainers
* @LegendaryJesse - [LegendaryJesse](https://github.com/JesseWeb)
## Copyright & License
* Code & Docs © 2020-now LegendaryJesse|Wechaty
* Code released under the MIT License
* Docs released under Creative Commons