Baileys Session (Mysql)
multi session baileys created on mysql databases
JOIN GROUP
how to use ?
First, you need to add the session package in package.json. You can use the github or npm version
version github
"session": "github.com/amiruldev20/baileys-session#mysql"
version npm
"session": "npm:baileys-mysql"
{
"name": "myproject",
"version": "1.0.1",
"author": "sanzydev",
"dependencies": {
"session": "github:amiruldev20/baileys-session#mysql"
}
}
Second step, please call the useMongoAuthState function on your client. Example code is below
import { useSqlAuthState } from "session"
const { useSqlAuthState } = require("session")
const config = {
host: 'host',
user: 'user',
password: 'password',
database: 'dbname'
};
const { state, saveCreds, clear, removeCreds, query } = await useSqlAuthState(config);
Note:
If there are bugs, please report & open an issue in the main repo.