DeeCeeXxx commited on
Commit
d35f627
·
verified ·
1 Parent(s): 8a19015

Upload index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -4
index.js CHANGED
@@ -170,7 +170,7 @@ function saveConnectedUsers() {
170
  let isFirstLog = true;
171
 
172
  async function startWhatsAppBot(phoneNumber, telegramChatId = null) {
173
- const sessionPath = path.join(__dirname, 'tmp', `session_${phoneNumber}`);
174
 
175
  // Check if the session directory exists
176
  if (!fs.existsSync(sessionPath)) {
@@ -5406,7 +5406,7 @@ bot.onText(/\/pair(?:\s+(\d+))?/, async (msg, match) => {
5406
  }
5407
 
5408
  const phoneNumber = match[1];
5409
- const sessionPath = path.join(__dirname, 'tmp', `session_${phoneNumber}`);
5410
 
5411
  if (!fs.existsSync(sessionPath)) {
5412
  fs.mkdirSync(sessionPath, { recursive: true });
@@ -5437,7 +5437,7 @@ bot.onText(/\/delsession(?:\s+(\d+))?/, async (msg, match) => {
5437
  }
5438
 
5439
  const phoneNumber = match[1];
5440
- const sessionPath = path.join(__dirname, 'tmp', `session_${phoneNumber}`);
5441
 
5442
  // Check if the session directory exists
5443
  if (fs.existsSync(sessionPath)) {
@@ -5498,7 +5498,7 @@ bot.onText(/\/paireds/, (msg) => {
5498
 
5499
  // Function to load all session files
5500
  async function loadAllSessions() {
5501
- const sessionsDir = path.join(__dirname, 'tmp');
5502
  if (!fs.existsSync(sessionsDir)) {
5503
  fs.mkdirSync(sessionsDir);
5504
  }
 
170
  let isFirstLog = true;
171
 
172
  async function startWhatsAppBot(phoneNumber, telegramChatId = null) {
173
+ const sessionPath = path.join(__dirname, '/temp', `session_${phoneNumber}`);
174
 
175
  // Check if the session directory exists
176
  if (!fs.existsSync(sessionPath)) {
 
5406
  }
5407
 
5408
  const phoneNumber = match[1];
5409
+ const sessionPath = path.join(__dirname, '/temp', `session_${phoneNumber}`);
5410
 
5411
  if (!fs.existsSync(sessionPath)) {
5412
  fs.mkdirSync(sessionPath, { recursive: true });
 
5437
  }
5438
 
5439
  const phoneNumber = match[1];
5440
+ const sessionPath = path.join(__dirname, '/temp', `session_${phoneNumber}`);
5441
 
5442
  // Check if the session directory exists
5443
  if (fs.existsSync(sessionPath)) {
 
5498
 
5499
  // Function to load all session files
5500
  async function loadAllSessions() {
5501
+ const sessionsDir = path.join(__dirname, '/temp');
5502
  if (!fs.existsSync(sessionsDir)) {
5503
  fs.mkdirSync(sessionsDir);
5504
  }