baileys-redis-auth
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

baileys-redis-auth

use redis as auth storage for baileys

how to install:

npm install baileys-redis-auth

update version 1.0.7:

const {useRedisAuthStateWithHSet, deleteHSetKeys} = require('baileys-redis-auth');

const  redisOptions  = {
	host:  'localhost',
	port:  6379,
};

const {state, saveCreds, redis} =  await  useRedisAuthStateWithHSet(redisOptions, 'DB1');

// if you need to delete all keys in the DB1 database, you can use the following code:
await deleteHSetKeys({redis, key: 'DB1'});

example v1.0.6:

const {useRedisAuthState, deleteKeysWithPattern} = require('baileys-redis-auth');

const  redisOptions  = {
	host:  'localhost',
	port:  6379,
};

const {state, saveCreds, redis} =  await  useRedisAuthState(redisOptions, 'DB1');

// if you need to delete all keys in the DB1 database, you can use the following code:
await deleteKeysWithPattern({redis, pattern: 'DB1*'});

Readme

Keywords

Package Sidebar

Install

npm i baileys-redis-auth

Weekly Downloads

50

Version

1.0.13

License

MIT

Unpacked Size

37.5 kB

Total Files

16

Last publish

Collaborators

  • hbinduni