From 8e8906d50a6e68a0aa47b25fdcc4f26567e0d796 Mon Sep 17 00:00:00 2001 From: Joren Date: Fri, 28 Jun 2024 01:16:25 +0200 Subject: [PATCH] Add output to file --- index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 714a521..1561126 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,5 @@ import { Client, Guild } from 'discord.js-selfbot-v13'; +import fs from 'fs'; const token = ''; @@ -37,9 +38,9 @@ class InfoClient extends Client { }); guildData[guild.name] = guildInfo; }); - //console.log(guildData) + const filename = `${this.user?.tag}[${token.substring(0, 5)}].json`; const jsonData = JSON.stringify(guildData, null, 2); - console.log(jsonData) + fs.writeFileSync(filename, jsonData); process.exit(); } }