diff --git a/index.ts b/index.ts index bb515da..ca0d9df 100644 --- a/index.ts +++ b/index.ts @@ -39,7 +39,7 @@ class InfoClient extends Client { }); guildData[guild.name] = guildInfo; }); - const filename = `output/${this.user?.tag} ${this.token.substring(0, 5)}.json`; + const filename = `output/${this.user?.tag} ${this.token.slice(-5)}.json`; const jsonData = JSON.stringify(guildData, null, 2); fs.writeFileSync(filename, jsonData); console.log(`Data saved to ${filename}`);