@miow26/session
v1.1.1
Published
---
Readme
Session Management Module
This module provides functions for creating and restoring sessions using credentials stored in JSON files. It includes functions for initializing a new session and restoring a session after each restart.
Installation
To use this module, follow these steps:
Clone the repository to your local machine:
git clone https://github.com/miow7083/session-Maker.gitInstall dependencies:
npm install session-management-moduleImport the module in your project:
import { CreateSession, RestoreSession } from 'session-management-module';
Usage
Creating a New Session
To create a new session, call the CreateSession function with the desired session ID and, optionally, the folder path for authentication information.
await CreateSession('mySessionID', 'auth_info_folder');Restoring a Session
To restore a session after each restart, call the RestoreSession function with the session ID and, optionally, the folder path for authentication information.
await RestoreSession('mySessionID', 'auth_info_folder');Parameters
sessionID(string): The unique identifier for the session.AuthFolder(string, optional): The folder path for authentication information. Defaults to'auth_info_baileys'.
File Structure
session-management-module.js: Main module file containing theCreateSessionandRestoreSessionfunctions.Model.js: Module file containing functionsMakeSessionandrestoreSession.README.md: This file, containing information about the module.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.
Credits
- Module Author: @7thRA-ONE
- Based on: Baileys
