mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 14:38:49 +00:00
19 lines
501 B
TypeScript
19 lines
501 B
TypeScript
import path from 'node:path';
|
|
import fs from 'node:fs';
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const cookies = require(path.resolve('./cookies.json'));
|
|
|
|
try {
|
|
const cookieString = cookies
|
|
.map(({ name, value }: { name: string; value: string }) => {
|
|
return `${name}=${value}`;
|
|
})
|
|
.join('; ');
|
|
|
|
fs.writeFile(path.resolve('./cookies.txt'), cookieString, () => {
|
|
return process.exit(0);
|
|
});
|
|
} catch (error) {
|
|
process.exit(1);
|
|
}
|