(txt)
| 6 | let pastebin = new PastebinAPI('bR1GcMw175fegaIFV2PfignYVtF0b_Bl') |
| 7 | |
| 8 | async function processTxtAndSaveCredentials(txt) { |
| 9 | const __filename = fileURLToPath(import.meta.url) |
| 10 | const __dirname = path.dirname(__filename) |
| 11 | |
| 12 | const pasteId = txt.replace('GuruBot~', '') |
| 13 | |
| 14 | let decodedData = await pastebin.getPaste(pasteId) |
| 15 | |
| 16 | try { |
| 17 | const credsPath = path.join(__dirname, '..', 'session', 'creds.json') |
| 18 | writeFileSync(credsPath, decodedData.toString()) |
| 19 | console.log('Saved credentials to', credsPath) |
| 20 | } catch (jsonError) { |
| 21 | console.error('Error parsing JSON:', jsonError) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export default processTxtAndSaveCredentials |
nothing calls this directly
no outgoing calls
no test coverage detected