Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mr687/baileys-conversation
https://github.com/mr687/baileys-conversation
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mr687/baileys-conversation
- Owner: mr687
- Created: 2023-02-12T17:29:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T21:40:21.000Z (9 months ago)
- Last Synced: 2024-11-26T09:13:36.491Z (27 days ago)
- Language: TypeScript
- Size: 139 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# baileys conversation
## Description
This package is for stores baileys conversation to MongoDB.
## Installation
```bash
yarn add baileys-conversation
```## Usage
```ts
import { useMongoConversation } from 'baileys-conversation'
import mongoose from 'mongoose'
import makeWASocket from '@adiwajshing/baileys'async function main() {
await mongoose.connect(process.env.MONGO_URI)const connection = mongoose.connection
await startSocket(connection)
}async function startSocket(connection) {
const conversation = useMongoConversation(connection, {
ignoreFromMe: false,
ignoreJids: [
// '[email protected]'
],
ignoreMessage: (message) => false,
})const sock = makeWASocket({})
conversation.binding(socket)
// ...
return sock
}main()
```