Skip to content

Commit abad50c

Browse files
committed
minor patch
1 parent 1f9ecd6 commit abad50c

File tree

4 files changed

+129
-140
lines changed

4 files changed

+129
-140
lines changed

commands/hack.js

+32-30
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ module.exports = {
1111
let member = await interaction.options.getUser("user").fetch(true);
1212

1313
function randomPassword() {
14-
var length = 8,
15-
charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=",
16-
retVal = "";
14+
var charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
15+
var length = Math.floor(Math.random() * (24 - 12 + 1)) + 12;
16+
var retVal = "";
17+
1718
for (var i = 0, n = charset.length; i < length; ++i) {
1819
retVal += charset.charAt(Math.floor(Math.random() * n));
1920
}
@@ -44,14 +45,14 @@ module.exports = {
4445
}
4546

4647
function randomPhrase() {
47-
var phrase = ["iirc", "idgaf", "lol", "xd", "haha", "you sux", "69420", "ratio"];
48+
var phrase = ["iirc", "idgaf", "lol", "xd", "haha", "u sux", "drown", "ratio", "lmao", "bruh", "smh", "wtf"];
4849
var result = phrase[Math.floor(Math.random() * phrase.length)];
4950
return result;
5051
}
5152

5253
function randomDM() {
5354
var message = [
54-
"ur mom is kinda hot",
55+
"ur mom's kinda hot",
5556
"look at this dude",
5657
"i wanna breakup with you",
5758
"imagine using macos",
@@ -81,6 +82,26 @@ module.exports = {
8182
return result;
8283
}
8384

85+
function randomDevice() {
86+
var device = [
87+
"iPhone",
88+
"iPad",
89+
"Mac",
90+
"Android phone",
91+
"Android tablet",
92+
"Windows Phone",
93+
"Windows PC",
94+
"Linux PC",
95+
"Xbox",
96+
"PlayStation",
97+
"Nintendo Switch",
98+
"Smart Fridge",
99+
"Smart TV",
100+
];
101+
var result = device[Math.floor(Math.random() * device.length)];
102+
return result;
103+
}
104+
84105
function randomBrowser() {
85106
var browser = [
86107
"Brave",
@@ -99,7 +120,7 @@ module.exports = {
99120
}
100121

101122
function randomUsername() {
102-
var malware = [
123+
var username = [
103124
"Minecraft4Life",
104125
"desperate_enuf",
105126
"kissmyaxe",
@@ -110,7 +131,7 @@ module.exports = {
110131
"oprah_wind_fury",
111132
"fresh_out_the_oven",
112133
];
113-
var result = malware[Math.floor(Math.random() * malware.length)];
134+
var result = username[Math.floor(Math.random() * username.length)];
114135
return result;
115136
}
116137

@@ -119,7 +140,7 @@ module.exports = {
119140
}
120141

121142
// For nerds: IPv4 have digits between 0 and 255,
122-
// so there wouldn't be issues about IPs if I use all digits about 255.
143+
// so there wouldn't be issues about IPs if I use all digits above 255.
123144
const randomIP = `${randomNumber(256, 999)}.${randomNumber(256, 999)}.${randomNumber(256, 999)}.${randomNumber(
124145
256,
125146
999
@@ -134,11 +155,11 @@ module.exports = {
134155
const log3 = `Email: ${randomEmail()}`;
135156
const log4 = `Pasword: ${randomPassword()}`;
136157
const log5 = `Fetching DMs with closest friends... (if they are any friends at all)`;
137-
const log6 = `Found latest DM: "${randomDM()}"`;
158+
const log6 = `Found latest DM message: "${randomDM()}"`;
138159
const log7 = `Finding user's most common phrase...`;
139160
const log8 = `Found user's most common phrase: ${randomPhrase()}`;
140-
const log9 = `Injecting ${randomMalware()} into discriminator #${member.discriminator}`;
141-
const log10 = `Malware injected, stole their ${randomBrowser()} password too.`;
161+
const log9 = `Injecting ${randomMalware()} into their ${randomDevice()}`;
162+
const log10 = `Malware injected, stole their passwords on ${randomBrowser()} as well.`;
142163
const log11 = `Hacking their Steam account...`;
143164
const log12 = `Breached user's Steam account: ${randomUsername()}`;
144165
const log13 = `Finding user's IP address...`;
@@ -163,7 +184,6 @@ module.exports = {
163184
value: [`\`\`\``, `[${time1}] ${log1}`, `\`\`\``].join("\n"),
164185
},
165186
],
166-
167187
},
168188
],
169189
});
@@ -181,7 +201,6 @@ module.exports = {
181201
value: [`\`\`\``, `[${time1}] ${log1}`, `[${time2}] ${log2}`, `\`\`\``].join("\n"),
182202
},
183203
],
184-
185204
},
186205
],
187206
});
@@ -206,7 +225,6 @@ module.exports = {
206225
].join("\n"),
207226
},
208227
],
209-
210228
},
211229
],
212230
});
@@ -232,7 +250,6 @@ module.exports = {
232250
].join("\n"),
233251
},
234252
],
235-
236253
},
237254
],
238255
});
@@ -259,7 +276,6 @@ module.exports = {
259276
].join("\n"),
260277
},
261278
],
262-
263279
},
264280
],
265281
});
@@ -287,7 +303,6 @@ module.exports = {
287303
].join("\n"),
288304
},
289305
],
290-
291306
},
292307
],
293308
});
@@ -316,7 +331,6 @@ module.exports = {
316331
].join("\n"),
317332
},
318333
],
319-
320334
},
321335
],
322336
});
@@ -346,7 +360,6 @@ module.exports = {
346360
].join("\n"),
347361
},
348362
],
349-
350363
},
351364
],
352365
});
@@ -377,7 +390,6 @@ module.exports = {
377390
].join("\n"),
378391
},
379392
],
380-
381393
},
382394
],
383395
});
@@ -409,7 +421,6 @@ module.exports = {
409421
].join("\n"),
410422
},
411423
],
412-
413424
},
414425
],
415426
});
@@ -442,7 +453,6 @@ module.exports = {
442453
].join("\n"),
443454
},
444455
],
445-
446456
},
447457
],
448458
});
@@ -476,7 +486,6 @@ module.exports = {
476486
].join("\n"),
477487
},
478488
],
479-
480489
},
481490
],
482491
});
@@ -511,7 +520,6 @@ module.exports = {
511520
].join("\n"),
512521
},
513522
],
514-
515523
},
516524
],
517525
});
@@ -547,7 +555,6 @@ module.exports = {
547555
].join("\n"),
548556
},
549557
],
550-
551558
},
552559
],
553560
});
@@ -587,7 +594,6 @@ module.exports = {
587594
value: [`\`\`\``, `[${time15}] ${maxLengthError}`, `[${time15}] ${log16}`, `\`\`\``].join("\n"),
588595
},
589596
],
590-
591597
},
592598
],
593599
});
@@ -633,7 +639,6 @@ module.exports = {
633639
].join("\n"),
634640
},
635641
],
636-
637642
},
638643
],
639644
});
@@ -680,7 +685,6 @@ module.exports = {
680685
].join("\n"),
681686
},
682687
],
683-
684688
},
685689
],
686690
});
@@ -728,7 +732,6 @@ module.exports = {
728732
].join("\n"),
729733
},
730734
],
731-
732735
},
733736
],
734737
});
@@ -779,7 +782,6 @@ module.exports = {
779782
value: "This is 100% a joke command that doesn't even hack people...",
780783
},
781784
],
782-
783785
},
784786
],
785787
});

index.js

+6-19
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
// Core codes
22
const fs = require("node:fs");
33
const path = require("node:path");
4-
const {
5-
Client,
6-
Collection,
7-
GatewayIntentBits,
8-
Partials,
9-
} = require("discord.js");
4+
const { Client, Collection, GatewayIntentBits, Partials, ActivityType } = require("discord.js");
105
const client = new Client({
116
presence: {
127
status: "dnd",
138
activities: [
149
{
1510
name: "/help | Hello, World!",
11+
type: ActivityType.Custom,
1612
},
1713
],
1814
},
@@ -25,9 +21,7 @@ require("dotenv").config({ path: path.resolve(__dirname, ".env") });
2521
client.commands = new Collection();
2622

2723
const commandsPath = path.join(__dirname, "commands");
28-
const commandFiles = fs
29-
.readdirSync(commandsPath)
30-
.filter((file) => file.endsWith(".js"));
24+
const commandFiles = fs.readdirSync(commandsPath).filter((file) => file.endsWith(".js"));
3125

3226
for (const file of commandFiles) {
3327
const filePath = path.join(commandsPath, file);
@@ -36,17 +30,13 @@ for (const file of commandFiles) {
3630
if ("data" in command && "execute" in command) {
3731
client.commands.set(command.data.name, command);
3832
} else {
39-
console.log(
40-
`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`
41-
);
33+
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
4234
}
4335
}
4436

4537
// Events Handler
4638
const eventsPath = path.join(__dirname, "events");
47-
const eventFiles = fs
48-
.readdirSync(eventsPath)
49-
.filter((file) => file.endsWith(".js"));
39+
const eventFiles = fs.readdirSync(eventsPath).filter((file) => file.endsWith(".js"));
5040

5141
for (const file of eventFiles) {
5242
const filePath = path.join(eventsPath, file);
@@ -75,10 +65,7 @@ app.get("/", (request, response) => {
7565
});
7666

7767
const cheweyBotAnalyticsAPI = require("discord-bot-analytics");
78-
const customAnalytics = new cheweyBotAnalyticsAPI(
79-
process.env.CHEYWEYAPI,
80-
client
81-
);
68+
const customAnalytics = new cheweyBotAnalyticsAPI(process.env.CHEYWEYAPI, client);
8269

8370
const { AutoPoster } = require("topgg-autoposter");
8471
const ap = AutoPoster(process.env.TOPGG, client);

0 commit comments

Comments
 (0)