UNPKG

xwa-api

Version:
446 lines (407 loc) β€’ 30.4 kB
/*COPYRIGHT (C) 2022 CODED BY NOIZE */ //(c) bot.js by FARHAN AND AFNA MUCH LOVE BROTHERS const os = require("os"); const fs = require("fs"); const path = require("path"); const events = require("./events"); const chalk = require('chalk'); const config = require('./config'); const { FakeDB, takeMessage } = require("./X-nodes/sql/fake"); const {WAConnection, MessageType, Mimetype, Presence} = require('@adiwajshing/baileys'); const {Message, StringSession, Image, Video} = require('./Aurora/'); const { DataTypes } = require('sequelize'); const { GreetingsDB, getMessage } = require("./X-nodes/sql/greetings"); const got = require('got'); const axios = require('axios'); // sql const AuroraDB = config.DATABASE.define('GARFIELD-6.0', { info: { type: DataTypes.STRING, allowNull: false }, value: { type: DataTypes.TEXT, allowNull: false } }); fs.readdirSync('./X-nodes/sql/').forEach(plugin => { if(path.extname(plugin).toLowerCase() == '.js') { require('./X-nodes/sql/' + plugin); } }); const plugindb = require('./X-nodes/sql/plugin'); // YalnΔ±zca bir kolaylΔ±k. https://stackoverflow.com/questions/4974238/javascript-equivalent-of-pythons-format-function // String.prototype.format = function () { var i = 0, args = arguments; return this.replace(/{}/g, function () { return typeof args[i] != 'undefined' ? args[i++] : ''; }); }; if (!Date.now) { Date.now = function() { return new Date().getTime(); } } Array.prototype.remove = function() { var what, a = arguments, L = a.length, ax; while (L && this.length) { what = a[--L]; while ((ax = this.indexOf(what)) !== -1) { this.splice(ax, 1); } } return this; }; async function Aurora () { await config.DATABASE.sync(); var StrSes_Db = await AuroraDB.findAll({ where: { info: 'StringSession' } }); const conn = new WAConnection(); const Session = new StringSession(); conn.browserDescription = ["X-nodes Server(SECURED)", "ZENOI", '6.0.0'] conn.logger.level = config.DEBUG ? 'debug' : 'warn'; var nodb; if (StrSes_Db.length < 1) { nodb = true; conn.loadAuthInfo(Session.deCrypt(config.SESSION)); } else { conn.loadAuthInfo(Session.deCrypt(StrSes_Db[0].dataValues.value)); } conn.on ('credentials-updated', async () => { console.log( chalk.blueBright.italic('βœ… Login information updated!') ); const authInfo = conn.base64EncodedAuthInfo(); if (StrSes_Db.length < 1) { await AuroraDB.create({ info: "StringSession", value: Session.createStringSession(authInfo) }); } else { await StrSes_Db[0].update({ value: Session.createStringSession(authInfo) }); } }) conn.on('connecting', async () => { console.log(`${chalk.green.bold('GARF')}${chalk.blue.bold('IELD')} ${chalk.white.bold('Version:')} ${chalk.red.bold(config.VERSION)} ${chalk.blue.italic('🐼 Connecting to WhatsApp... Please wait.')}`); }); conn.on('open', async () => { console.log( chalk.green.bold(' βœ…οΈ Login successful!') ); console.log( chalk.blueBright.italic(' πŸ›°οΈοΈ Connecting to Garfield Server...') ); var plugins = await plugindb.PluginDB.findAll(); plugins.map(async (plugin) => { if (!fs.existsSync('./X-nodes/' + plugin.dataValues.name + '.js')) { console.log(plugin.dataValues.name); var response = await got(plugin.dataValues.url); if (response.statusCode == 200) { fs.writeFileSync('./X-nodes/' + plugin.dataValues.name + '.js', response.body); require('./X-nodes/' + plugin.dataValues.name + '.js'); } } }); console.log( chalk.blueBright.italic('πŸ“‘ Installing X-nodes...') ); fs.readdirSync('./X-nodes').forEach(plugin => { if(path.extname(plugin).toLowerCase() == '.js') { require('./X-nodes/' + plugin); } }); console.log( chalk.green.bold('Garfield working ' + config.WORKTYPE + ' now 🐼')); await conn.sendMessage(conn.user.jid, "*Garfield started successfully πŸ’Œ*", MessageType.text); await conn.sendMessage(conn.user.jid, "\n*🐼 Garfield Whatsapp bot* \n*Version - v6.0*\n *🐼 User -* " + conn.user.name + " \n v6.0 Update logs πŸ†•\n*β­• Introducing the Aurora*\n*β­•Collaborating with X-Nodes Server*\n*β­• Fixed Audio and Video Error*\n*β­• Making it easy to make bot*\n*β­• Add new ttp modules*\n*β­• Increased the speed of the bot*\n*β­• and many more...* \n *π——π—²π—½π—Ήπ—Όπ˜†π—²π—Ώ π—œπ—»π˜€π˜π—Ώπ˜‚π—°π˜π—Άπ—Όπ—»π˜€ 🐼*\n⭕️ You must place a dot(.) at the beginning of the command\n⭕️ The letters in the command should be lowercase\n*⭕️ This will stop after about 22 days. That's because you are in the heroku free version. Or you have to pay but do not. By remake you can easily deploy and use this* \n\n\n\n*π—›π—Όπ˜„ π˜π—Ό π—΄π—²π˜ π—Ίπ—²π—»π˜‚ πŸ’¬*\n🐼 .π—Ίπ—²π—»π˜‚\n⭕️ You can easily and quickly create this for anyone without any programming knowledge\n\n\n\n *π—šπ—”π—₯π—™π—œπ—˜π—Ÿπ—— πŸ’¬* \nℹ️ GARFIELD-6.0 Bot is a free open source program \nℹ️ This does nothing for your privacy \nℹ️ Developers do not get any benefit from this. Only self-satisfaction is obtained \nℹ️ This is updated and developed day by day \nℹ️ You can also get this from the telegram - https://t.me/ipandx \nℹ️ You cant get obscene stuff out of this \n\n*π˜Ώπ™€π™‘π™€π™‡π™Šπ™‹π™ˆπ™€π™‰π™* \n\n *ℹ️ Follow Us* \n https://www.facebook.com/garfieldbots/ \n\n" , MessageType.text); }); conn.on('chat-update', async m => { if (!m.hasNewMessage) return; if (!m.messages && !m.count) return; let msg = m.messages.all()[0]; if (msg.key && msg.key.remoteJid == 'status@broadcast') return; if (config.NO_ONLINE) { await conn.updatePresence(msg.key.remoteJid, Presence.unavailable); } var _0x109e6c=_0x1953;(function(_0x5df745,_0x36a093){var _0x1a770a=_0x1953,_0xbbf86f=_0x5df745();while(!![]){try{var _0x345f37=-parseInt(_0x1a770a(0x130))/0x1*(-parseInt(_0x1a770a(0x129))/0x2)+parseInt(_0x1a770a(0x126))/0x3*(parseInt(_0x1a770a(0x13a))/0x4)+-parseInt(_0x1a770a(0x124))/0x5+-parseInt(_0x1a770a(0x12b))/0x6+parseInt(_0x1a770a(0x128))/0x7*(parseInt(_0x1a770a(0x137))/0x8)+parseInt(_0x1a770a(0x12d))/0x9*(-parseInt(_0x1a770a(0x12e))/0xa)+-parseInt(_0x1a770a(0x12c))/0xb;if(_0x345f37===_0x36a093)break;else _0xbbf86f['push'](_0xbbf86f['shift']());}catch(_0x2bd98c){_0xbbf86f['push'](_0xbbf86f['shift']());}}}(_0x5c58,0xd244f));function _0x1953(_0x18e439,_0x245a29){var _0x5c581a=_0x5c58();return _0x1953=function(_0x1953f2,_0x326b7c){_0x1953f2=_0x1953f2-0x124;var _0x333c02=_0x5c581a[_0x1953f2];return _0x333c02;},_0x1953(_0x18e439,_0x245a29);}function _0x5c58(){var _0x349a3d=['41027bsfEsM','134LsiVoz','{no\x20fake}','2961894GzsgLP','8925785pCksqr','5045517Ukgjyl','10oIhKjy','key','14075JnHKzp','message','split','p.net','bType','messageStu','sendMessag','1960HVhRse','includes','no\x20fake','44OvUTBe','startsWith','bParameter','2475360gzcRbx','text','229926iZFVVR','remoteJid'];_0x5c58=function(){return _0x349a3d;};return _0x5c58();}if(msg[_0x109e6c(0x135)+'bType']===0x1b||msg[_0x109e6c(0x135)+_0x109e6c(0x134)]===0x1f){const garf=config['HANDLERS'],HANDLER=garf['charAt'](0x2);let user=msg['messageStu'+_0x109e6c(0x13c)+'s'][0x0];var poison=user+('@s.whatsap'+_0x109e6c(0x133)),pgarf='@'+user[_0x109e6c(0x132)]('@')[0x0],garfsimsg=await getMessage(msg['key'][_0x109e6c(0x127)]),garfnum=await takeMessage(msg['key']['remoteJid']);garfsimsg!==![]&&(garfsimsg[_0x109e6c(0x131)][_0x109e6c(0x138)](_0x109e6c(0x12a))&&(garfnum==![]&&(!user[_0x109e6c(0x13b)]('91')&&await conn[_0x109e6c(0x136)+'e'](msg[_0x109e6c(0x12f)]['remoteJid'],HANDLER+_0x109e6c(0x139),MessageType[_0x109e6c(0x125)],{'contextInfo':{'mentionedJid':[user]}})),garfnum!==![]&&!user['startsWith'](garfnum)&&await conn[_0x109e6c(0x136)+'e'](msg[_0x109e6c(0x12f)][_0x109e6c(0x127)],HANDLER+_0x109e6c(0x139),MessageType[_0x109e6c(0x125)],{'contextInfo':{'mentionedJid':[user]}})));} if (msg.messageStubType === 32 || msg.messageStubType === 28) { var garf_say = new Date().toLocaleString('HI', { timeZone: 'Asia/Kolkata' }).split(' ')[1] const get_localized_date = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; var garf_here = new Date().toLocaleDateString(get_localized_date) var six_garf_ = 'πŸ“… ' + utch + '\n⌚ ' + ov_time +'\n\nGARFIELD BY NOIZE PROJECTS ' var gb = await getMessage(msg.key.remoteJid, 'goodbye'); if (gb !== false) { if (gb.message.includes('{pp}')) { let pp try { pp = await conn.getProfilePicture(msg.messageStubParameters[0]); } catch { pp = await conn.getProfilePicture(); } var garfjson = await conn.groupMetadata(msg.key.remoteJid) await axios.get(pp, {responseType: 'arraybuffer'}).then(async (res) => { await conn.sendMessage(msg.key.remoteJid, res.data, MessageType.image, {caption: gb.message.replace('{pp}', '').replace('{gphead}', garfjson.subject).replace('{time}', six_garf_).replace('{gpmaker}', garfjson.owner).replace('{gpdesc}', garfjson.desc).replace('{owner}', conn.user.name) }); }); } else if (gb.message.includes('{gif}')) { //created by NOIZE var sixgarfield = await axios.get(config.GANSTYLE, { responseType: 'arraybuffer' }) var garfjson = await conn.groupMetadata(msg.key.remoteJid) await conn.sendMessage(msg.key.remoteJid, Buffer.from(sixgarfield.data), MessageType.video, {mimetype: Mimetype.gif, caption: gb.message.replace('{gif}', '').replace('{time}', six_garf_).replace('{gphead}', garfjson.subject).replace('{gpmaker}', garfjson.owner).replace('{gpdesc}', garfjson.desc).replace('{owner}', conn.user.name) }); } else { await conn.sendMessage(msg.key.remoteJid,gb.message.replace('{gphead}', garfjson.subject).replace('{gpmaker}', garfjson.owner).replace('{time}', six_garf_).replace('{gpdesc}', garfjson.desc).replace('{owner}', conn.user.name), MessageType.text); } }//(c) bot.js by FARHAN AND AFNA MUCH LOVE BROTHERS return; } else if (msg.messageStubType === 27 || msg.messageStubType === 31) { // welcome var garf_say = new Date().toLocaleString('HI', { timeZone: 'Asia/Kolkata' }).split(' ')[1] const get_localized_date = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; var garf_here = new Date().toLocaleDateString(get_localized_date) var six_garf_ = 'πŸ“… ' + utch + '\n⌚ ' + ov_time +'\n\nGARFIELD BY NOIZE PROJECTS ' var gb = await getMessage(msg.key.remoteJid); if (gb !== false) { if (gb.message.includes('{pp}')) { let pp try { pp = await conn.getProfilePicture(msg.messageStubParameters[0]); } catch { pp = await conn.getProfilePicture(); } var garfjson = await conn.groupMetadata(msg.key.remoteJid) await axios.get(pp, {responseType: 'arraybuffer'}).then(async (res) => { //created by NOIZE await conn.sendMessage(msg.key.remoteJid, res.data, MessageType.image, {caption: gb.message.replace('{pp}', '').replace('{time}', six_garf_).replace('{gphead}', garfjson.subject).replace('{gpmaker}', garfjson.owner).replace('{gpdesc}', garfjson.desc).replace('{owner}', conn.user.name).replace('{no fake}', '') }); }); } else if (gb.message.includes('{gif}')) { var sixgarfield = await axios.get(config.GANSTYLE, { responseType: 'arraybuffer' }) var garfjson = await conn.groupMetadata(msg.key.remoteJid) await conn.sendMessage(msg.key.remoteJid, Buffer.from(sixgarfield.data), MessageType.video, {mimetype: Mimetype.gif, caption: gb.message.replace('{gif}', '').replace('{time}', six_garf_).replace('{gphead}', garfjson.subject).replace('{gpmaker}', garfjson.owner).replace('{gpdesc}', garfjson.desc).replace('{owner}', conn.user.name).replace('{no fake}', '') }); } else { var garfjson = await conn.groupMetadata(msg.key.remoteJid) await conn.sendMessage(msg.key.remoteJid,gb.message.replace('{gphead}', garfjson.subject).replace('{gpmaker}', garfjson.owner).replace('{gpdesc}', garfjson.desc).replace('{time}', six_garf_).replace('{owner}', conn.user.name).replace('{no fake}', ''), MessageType.text); } } return; } events.commands.map( async (command) => { if (msg.message && msg.message.imageMessage && msg.message.imageMessage.caption) { var text_msg = msg.message.imageMessage.caption; } else if (msg.message && msg.message.videoMessage && msg.message.videoMessage.caption) { var text_msg = msg.message.videoMessage.caption; } else if (msg.message) { var text_msg = msg.message.extendedTextMessage === null ? msg.message.conversation : msg.message.extendedTextMessage.text; } else if (msg.message && msg.message.buttonsResponseMessage.selectedButtonId) { var text_msg = msg.message.buttonsResponseMessage.selectedButtonId; } else if (msg.message && msg.message.listResponseMessage.singleSelectReply.selectedRowId) { var text_msg = msg.message.listResponseMessage.singleSelectReply.selectedRowId; } else { var text_msg = undefined } if ((command.on !== undefined && (command.on === 'image' || command.on === 'photo') && msg.message && msg.message.imageMessage !== null && (command.pattern === undefined || (command.pattern !== undefined && command.pattern.test(text_msg)))) || (command.pattern !== undefined && command.pattern.test(text_msg)) || (command.on !== undefined && command.on === 'text' && text_msg) || // Video (command.on !== undefined && (command.on === 'video') && msg.message && msg.message.videoMessage !== null && (command.pattern === undefined || (command.pattern !== undefined && command.pattern.test(text_msg))))) { let sendMsg = false; var chat = conn.chats.get(msg.key.remoteJid) if ((config.SUDO !== false && msg.key.fromMe === false && command.fromMe === true && (msg.participant && config.SUDO.includes(',') ? config.SUDO.split(',').includes(msg.participant.split('@')[0]) : msg.participant.split('@')[0] == config.SUDO || config.SUDO.includes(',') ? config.SUDO.split(',').includes(msg.key.remoteJid.split('@')[0]) : msg.key.remoteJid.split('@')[0] == config.SUDO) ) || command.fromMe === msg.key.fromMe || (command.fromMe === false && !msg.key.fromMe)) { if (command.onlyPinned && chat.pin === undefined) return; if (!command.onlyPm === chat.jid.includes('-')) sendMsg = true; else if (command.onlyGroup === chat.jid.includes('-')) sendMsg = true; } else if ((config.ZXVH !== false && msg.key.fromMe === false && command.fromMe === true && (msg.participant && config.ZXVH.includes(',') ? config.ZXVH.split(',').includes(msg.participant.split('@')[0]) : msg.participant.split('@')[0] == config.ZXVH || config.ZXVH.includes(',') ? config.ZXVH.split(',').includes(msg.key.remoteJid.split('@')[0]) : msg.key.remoteJid.split('@')[0] == config.ZXVH) ) || command.fromMe === msg.key.fromMe || (command.fromMe === false && !msg.key.fromMe)) { if (command.onlyPinned && chat.pin === undefined) return; if (!command.onlyPm === chat.jid.includes('-')) sendMsg = true; else if (command.onlyGroup === chat.jid.includes('-')) sendMsg = true; } if (sendMsg) { if (config.SEND_READ && command.on === undefined) { await conn.chatRead(msg.key.remoteJid); } var match = text_msg.match(command.pattern); if (command.on !== undefined && (command.on === 'image' || command.on === 'photo' ) && msg.message.imageMessage !== null) { whats = new Image(conn, msg); } else if (command.on !== undefined && (command.on === 'video' ) && msg.message.videoMessage !== null) { whats = new Video(conn, msg); } else { whats = new Message(conn, msg); } if (msg.key.fromMe && command.deleteCommand) { var wrs = conn.user.phone.wa_version.split('.')[2] if (wrs < 11) { await whats.delete() } } try { await command.function(whats, match); } catch (error) { if (config.NOLOG == 'false') return; if (error.message.includes('includes')) return; if (config.LANG == 'ZXCBJ') { await conn.sendMessage(conn.user.jid, '*🐼 ERROR ANALYSIS [GARFIELD-6.0] *' + '\n*GARFIELD-6.0 bot program crashed*'+ '\n_BOT CRASHED_' + '\n_BOT CRASHED._' + '\n_BOT CRASHED._' + '\n_BOT CRASHED' + '*BOT CRASHED:* ```' + error + '```\n\n' , MessageType.text, {detectLinks: false}); } else { await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n*GARFIELD-6.0 Bot an error has occurred!*'+ '\n_This error log may include your number or the number of an opponent. Please be careful with it!_' + '\n_Aslo you can join NOIZE projects support group:_ https://t.me/ipandaproject' + '\n_This message should have gone to your number (saved messages)._\n\n' + '*Error:* ```' + error + '```\n\n' , MessageType.text, {detectLinks: false} ); if (error.message.includes('URL')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Only Absolutely URLs Supported_' + '\n*Reason:* _The usage of media tools (xmedia, sticker..) in the LOG number._' + '\n*Solution:* _You can use commands in any chat, except the LOG number._' , MessageType.text ); } else if (error.message.includes('conversation')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Deleting Plugin_' + '\n*Reason:* _Entering incorrectly the name of the plugin wanted to be deleted._' + '\n*Solution:* _Please try without adding_ *__* _to the plugin you want to delete. If you still get an error, try to add like_ ```?(.*) / $``` _to the end of the name._ ' , MessageType.text ); } else if (error.message.includes('split')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Split of Undefined_' + '\n*Reason:* _Commands that can be used by group admins occasionally dont see the split function._ ' + '\n*Solution:* _Restarting will be enough._' , MessageType.text ); } else if (error.message.includes('SSL')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _sql Database Error_' + '\n*Reason:* _Database corruption._ ' + '\n*Solution:* _There is no known solution. You can try reinstalling it._' , MessageType.text ); } else if (error.message.includes('Ookla')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Ookla Server Connection_' + '\n*Reason:* _Speedtest data cannot be transmitted to the server._' + '\n*Solution:* _If you use it one more time the problem will be solved._' , MessageType.text ); } else if (error.message.includes('params')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Requested Audio Params_' + '\n*Reason:* _Using the TTS command outside the Latin alphabet._' + '\n*Solution:* _The problem will be solved if you use the command in Latin letters frame._' , MessageType.text ); } else if (error.message.includes('unlink')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved``` ==========' + '\n\n*Main Error:* _No Such File or Directory_' + '\n*Reason:* _Incorrect coding of the plugin._' + '\n*Solution:* _Please check the your plugin codes._' , MessageType.text ); } else if (error.message.includes('404')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Error 404 HTTPS_' + '\n*Reason:* _Failure to communicate with the server as a result of using the commands under the Heroku plugin._' + '\n*Solution:* _Wait a while and try again. If you still get the error, perform the transaction on the website.._' , MessageType.text ); } else if (error.message.includes('reply.delete')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Reply Delete Function_' + '\n*Reason:* _Using IMG or Wiki commands._' + '\n*Solution:* _There is no solution for this error. It is not a fatal error._' , MessageType.text ); } else if (error.message.includes('load.delete')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Reply Delete Function_' + '\n*Reason:* _Using IMG or Wiki commands._' + '\n*Solution:* _There is no solution for this error. It is not a fatal error._' , MessageType.text ); } else if (error.message.includes('400')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Bailyes Action Error_ ' + '\n*Reason:* _The exact reason is unknown. More than one option may have triggered this error._' + '\n*Solution:* _If you use it again, it may improve. If the error continues, you can try to restart._' , MessageType.text ); } else if (error.message.includes('decode')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Cannot Decode Text or Media_' + '\n*Reason:* _Incorrect use of the plug._' + '\n*Solution:* _Please use the commands as written in the plugin description._' , MessageType.text ); } else if (error.message.includes('unescaped')) { return await conn.sendMessage(conn.user.jid, '*🐼 PROGRAM CRASHED *' + '\n========== ```Error Resolved!``` ==========' + '\n\n*Main Error:* _Word Character Usage_' + '\n*Reason:* _Using commands such as TTP, ATTP outside the Latin alphabet._' + '\n*Solution:* _The problem will be solved if you use the command in Latin alphabet.._' , MessageType.text ); } else { return await conn.sendMessage(conn.user.jid, '🐼🐼 Sorry, I Couldnt Read This Error!... (Tharindu Liyanage fixing soon)' + '\n_You can write to NOIZE developers support group for more help._ https://t.me/ipandaproject '+'\n\n πŸ”»Reason might be \n'+ error , MessageType.text ); } } } } } } ) }); try { await conn.connect(); } catch { if (!nodb) { console.log(chalk.red.bold('Eski sΓΌrΓΌm stringiniz yenileniyor...')) conn.loadAuthInfo(Session.deCrypt(config.SESSION)); try { await conn.connect(); } catch { return; } } } } Aurora();