sphinx.djs 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,154 @@
1
+
2
+ import wait from "node:timers/promises";
3
+
4
+ import events from "events";
5
+ const emitter = new events.EventEmitter();
6
+ export class botAccount {
7
+ constructor(client, discord) {
8
+ this.Discord = discord;
9
+ this.client = client;
10
+ }
11
+ async broadcast({ownerId = [], prefix = "!", embedReply = "Made by Sphinx.", mention = false, type = "all" | "online"}) {
12
+ if(!ownerId) {
13
+ console.error("Owner ID is required.");
14
+ return process.exit(1);
15
+ }
16
+ if(!Array.isArray(ownerId)) {
17
+ console.error("Owner ID must be an array.");
18
+ return process.exit(1);
19
+ }
20
+ if(!prefix) {
21
+ console.error("No prefix was provided, defaulting to '!'.");
22
+ }
23
+ if(!type) {
24
+ console.error("No type was provided, defaulting to 'online'.");
25
+ }
26
+ const row = new this.Discord.MessageActionRow().addComponents(
27
+ new this.Discord.MessageButton()
28
+ .setCustomId("yes")
29
+ .setLabel("Send")
30
+ .setStyle("SUCCESS")
31
+ )
32
+ .addComponents(
33
+ new this.Discord.MessageButton()
34
+ .setCustomId("no")
35
+ .setLabel("Cancel")
36
+ .setStyle("DANGER")
37
+ )
38
+ this.client.on("messageCreate", async(message) => {
39
+ if(!ownerId.includes(message.author.id)) return;
40
+ const args = message.content.slice(prefix.length).trim().split(" ");
41
+ if(message.content.startsWith(prefix + "help")) {
42
+ const embed = new this.Discord.MessageEmbed()
43
+ .setColor("#0099ff")
44
+ .setTitle("BroadCast")
45
+ .setDescription("This is a bot that broadcasts a message to all users in a server.")
46
+ .addField("Usage", `${prefix}bc <message>`)
47
+ .addField("Example", `${prefix}bc Hello World!`)
48
+ .addField("Permissions", "You must have the 'Send Messages' permission to use this command.")
49
+ .setFooter("Made by Sphinx.");
50
+ message.channel.send({ embeds: [embed]})
51
+ };
52
+ if(type && type === "all") {
53
+ if(message.content.startsWith(prefix + "bc")) {
54
+ let words = args.splice(1).join(" ");
55
+ if(!words) return message.channel.send("No message was provided.");
56
+ const filter = (i) =>
57
+ (i.customId === row.components[0].customId && i.user.id === message.author.id) ||
58
+ (i.customId === row.components[1].customId && i.user.id === message.author.id);
59
+ let msg = await message.channel.send({ embeds: [
60
+ new this.Discord.MessageEmbed()
61
+ .setTitle("Are you sure you want to this send broadcast?")
62
+ .setDescription(embedReply)
63
+ ], components: [row]});
64
+ const collector = msg.createMessageComponentCollector({
65
+ filter,
66
+ time: 20000
67
+ });
68
+ collector.on("collect", async(i) => {
69
+ if(i.customId === row.components[0].customId) {
70
+ message.guild.members.cache.forEach((m) => {
71
+ await wait(5000);
72
+ m.send(mention ? `${words} \n \n ${m}` : words).then(() => {
73
+ console.log(`Sent message to ${m.user.username}#${m.user.discriminator} ✅`);
74
+ }).catch(() => {
75
+ console.log(`Failed to send message to ${m.user.username}#${m.user.discriminator} ❌`);
76
+ });
77
+ await wait(5000);
78
+ });
79
+ await i.deferUpdate();
80
+
81
+ await i.editReply({
82
+ content: "Done",
83
+ components: [],
84
+ embeds: []
85
+ })
86
+ }
87
+ if(i.customId === row.components[1].customId) {
88
+ await i.deferUpdate();
89
+ await i.editReply({
90
+ content: "Cancelled",
91
+ components: [],
92
+ embeds: []
93
+ })
94
+ }
95
+ })
96
+ }
97
+ }
98
+ if(type && type === 'online') {
99
+ if(message.content.startsWith(prefix + "bc")) {
100
+ let words = args.splice(1).join(" ");
101
+ if(!words) return message.channel.send("No message was provided.");
102
+ const filter = (i) =>
103
+ (i.customId === row.components[0].customId && i.user.id === message.author.id) ||
104
+ (i.customId === row.components[1].customId && i.user.id === message.author.id);
105
+ let msg = await message.channel.send({ embeds: [
106
+ new this.Discord.MessageEmbed()
107
+ .setTitle("Are you sure you want to this send broadcast?")
108
+ .setDescription(embedReply)
109
+ ], components: [row]});
110
+ const collector = msg.createMessageComponentCollector({
111
+ filter,
112
+ time: 20000
113
+ });
114
+ collector.on("collect", async(i) => {
115
+ if(i.customId === row.components[0].customId) {
116
+ message.guild.members.cache.forEach((m) => {
117
+ if(m.presence?.status !== 'offline') {
118
+ await wait(5000);
119
+ m.send(mention ? `${words} \n \n ${m}` : words).then(() => {
120
+ console.log(`Sent message to ${m.user.username}#${m.user.discriminator} ✅`);
121
+ }).catch(() => {
122
+ console.log(`Failed to send message to ${m.user.username}#${m.user.discriminator} ❌`);
123
+ });
124
+ await wait(5000);
125
+ }
126
+ });
127
+ await i.deferUpdate();
128
+
129
+ await i.editReply({
130
+ content: "Done",
131
+ components: [],
132
+ embeds: []
133
+ })
134
+ }
135
+ if(i.customId === row.components[1].customId) {
136
+ await i.deferUpdate();
137
+ await i.editReply({
138
+ content: "Cancelled",
139
+ components: [],
140
+ embeds: []
141
+ })
142
+ }
143
+ })
144
+ }
145
+ }
146
+ });
147
+ }
148
+
149
+ }
150
+
151
+
152
+
153
+
154
+ module.exports = {botAccount}
@@ -0,0 +1,119 @@
1
+ const {codeBlock} = require("@discordjs/builders");
2
+ class userAccount {
3
+ constructor(client, discord) {
4
+ this.client = client;
5
+ this.Discord = discord;
6
+ }
7
+ autoReaction(channel, user) {
8
+ this.client.on("messageCreate", async (message) => {
9
+ if (message.author.id === "294882584201003009") {
10
+ if (!message.embeds[0]) return;
11
+ if (message.content.startsWith("Congratulations")) return;
12
+ let mainChannel = await this.client.channels.fetch(channel);
13
+ let mainUser = await this.client.users.fetch(user);
14
+ await wait(2000);
15
+ await message.react("🎉").then(async (m) => {
16
+ mainChannel.send(`New Giveaway ${mainUser}`);
17
+ await mainChannel.send({
18
+ content: codeBlock(
19
+ "md",
20
+ `New Giveaway At: \n **${message.url}** \n\n Giveaway Created At: \n ${
21
+ new Date(message.createdAt).getHours()
22
+ }:${new Date(message.createdAt).getMinutes()}:${new Date(message.createdAt).getSeconds()} \n\n Giveaway Ends At : \n ${new Date(message.embeds[0].timestamp).getHours()}:${new Date(message.embeds[0].timestamp).getMinutes()}:${new Date(message.embeds[0].timestamp).getSeconds()}`
23
+ ),
24
+ });
25
+ });
26
+ }
27
+ if (message.author.id === "396464677032427530") {
28
+ if (!message.embeds[0]) return;
29
+ if (message.content.startsWith("Congratulations")) return;
30
+ let mainChannel = await this.client.channels.fetch(channel);
31
+ let mainUser = await this.client.users.fetch(user);
32
+ await wait(2000);
33
+ await message.react("🎉").then(async (m) => {
34
+ mainChannel.send(`New Giveaway ${mainUser}`);
35
+ await mainChannel.send({
36
+ content: codeBlock(
37
+ "md",
38
+ `New Giveaway At: \n **${message.url}** \n\n Giveaway Created At: \n ${
39
+ new Date(message.createdAt).getHours()
40
+ }:${new Date(message.createdAt).getMinutes()}:${new Date(message.createdAt).getSeconds()} \n\n Giveaway Ends At : \n ${new Date(message.embeds[0].timestamp).getHours()}:${new Date(message.embeds[0].timestamp).getMinutes()}:${new Date(message.embeds[0].timestamp).getSeconds()}`
41
+ ),
42
+ });
43
+ });
44
+ }
45
+ });
46
+ }
47
+ leveling({
48
+ channel,
49
+ randomLetters = false,
50
+ time = 15000,
51
+ type = 'eng'
52
+ }) {
53
+ if (!channel) {
54
+ console.error(new Error("No channel id were specified!"));
55
+ return process.exit(1);
56
+ }
57
+
58
+ if(type === 'eng') {
59
+ function makeid(length) {
60
+ var result = "";
61
+ var characters =
62
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
63
+ var charactersLength = characters.length;
64
+ for (var i = 0; i < length; i++) {
65
+ result += characters.charAt(
66
+ Math.floor(Math.random() * charactersLength)
67
+ );
68
+ }
69
+ return result;
70
+ }
71
+ const Discord = this.Discord;
72
+ const client = this.client;
73
+ let arrayOfMostUsedWords = require("../languages.json").eng;
74
+ client.on("ready", async() => {
75
+ console.log("Leveling class is ready!");
76
+ let mainChannel = await client.channels.fetch(channel);
77
+ let random = Math.floor(Math.random() * 15);
78
+ if (random === 0) return;
79
+ setInterval(async () => {
80
+ let randomString = Math.floor(Math.random() * arrayOfMostUsedWords.length);
81
+ await mainChannel.send(
82
+ randomLetters ? makeid(random) : arrayOfMostUsedWords[randomString]
83
+ );
84
+ }, time);
85
+ });
86
+ }
87
+ if(type === 'ar') {
88
+ function makeid(length) {
89
+ var result = "";
90
+ var characters =
91
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
92
+ var charactersLength = characters.length;
93
+ for (var i = 0; i < length; i++) {
94
+ result += characters.charAt(
95
+ Math.floor(Math.random() * charactersLength)
96
+ );
97
+ }
98
+ return result;
99
+ }
100
+ const Discord = this.Discord;
101
+ const client = this.client;
102
+ let arrayOfMostUsedWords = require("../lanuages.json").eng;
103
+ client.on("ready", async() => {
104
+ console.log("Leveling class is ready!");
105
+ let mainChannel = await client.channels.fetch(channel);
106
+ let random = Math.floor(Math.random() * 15);
107
+ if (random === 0) return;
108
+ setInterval(async () => {
109
+ let randomString = Math.floor(Math.random() * arrayOfMostUsedWords.length);
110
+ await mainChannel.send(
111
+ randomLetters ? makeid(random) : arrayOfMostUsedWords[randomString]
112
+ );
113
+ }, time);
114
+ });
115
+ }
116
+ }
117
+ }
118
+
119
+ module.exports = userAccount
@@ -0,0 +1,48 @@
1
+ import axios from "axios";
2
+ import event from "events";
3
+ const emitter = new event.EventEmitter();
4
+ export default emitter;
5
+ export class createBot {
6
+ constructor(token) {
7
+
8
+ this.token = token;
9
+ }
10
+ async create(name) {
11
+ if(!this.token) return console.error("Please Provide a token.");
12
+ if(!name) return console.error("Please provide a name");
13
+
14
+ const request = await axios({
15
+ url: 'https://discord.com/api/v9/applications',
16
+ method: "POST",
17
+ headers: {
18
+ Authorization: this.token
19
+ },
20
+ "content-type": "application/json",
21
+ data: {
22
+ name: name
23
+ }
24
+ });
25
+ let data = request.data;
26
+ axios({
27
+ url: `https://discord.com/api/v9/applications/${data.id}/bot`,
28
+ method: "POST",
29
+ headers: {
30
+ Authorization: this.token
31
+ },
32
+ "content-type": "application/json"
33
+ }).then(() => {
34
+ axios({
35
+ url: `https://discord.com/api/v9/applications/${data.id}/bot/reset`,
36
+ method: 'POST',
37
+ headers: {
38
+ Authorization: this.token
39
+ },
40
+ "content-type": "application/json"
41
+ }).then((res) => {
42
+ setTimeout(() => {
43
+ emitter.emit('GetBotToken', res.data)
44
+ }, 2000)
45
+ })
46
+ })
47
+ }
48
+ }
package/Utils/music.js ADDED
File without changes
package/inedx.js ADDED
@@ -0,0 +1,12 @@
1
+ // import userAccount from "./BroadCast/userAccount.cjs";
2
+
3
+ // import Discord from "discord.js-selfbot-v13"
4
+ // const client = new Discord.Client({ intents: 32767, checkUpdate: false})
5
+ // new userAccount(client, Discord).leveling({ channel: "1000710976343134292", randomLetters: true});
6
+ // client.login("NjQyNTEzMDk1MzMxMTUxOTAz.GCIGSD.l9UVXs1j8gxvtXknq4fLeQaxuCNqkmgkjC2OL4")
7
+ import nah, { createBot } from './Utils/createBot.js';
8
+
9
+ new createBot('NjQyNTEzMDk1MzMxMTUxOTAz.GCIGSD.l9UVXs1j8gxvtXknq4fLeQaxuCNqkmgkjC2OL4').create("justThisTimePlsWork");
10
+ nah.on('GetBotToken', token => {
11
+ console.log(token)
12
+ })
package/languages.json ADDED
@@ -0,0 +1,305 @@
1
+ {
2
+ "ar": [
3
+ "أَتَمَنَّى",
4
+ "أَثِقْ",
5
+ "الِاثْنَيْنِ",
6
+ "أُخْرَى",
7
+ "أَخْشَى",
8
+ "أَلِأرْضٍ",
9
+ "أَلِأُسْبُوعٍ",
10
+ "أَسْتَطِيعُ",
11
+ "أَلِأسْئِلَةٍ",
12
+ "أَلِأَشْيَاءٍ",
13
+ "أَصْدِقاءُ",
14
+ "إضافَةً",
15
+ "أَعْتَقِدُ",
16
+ "أَعُرْفً",
17
+ "أَلِأفْضَلِ",
18
+ "أَنَا",
19
+ "أَنْتَ",
20
+ "أَلِاِنْتِظارٍ",
21
+ "إِنْتَظُرْ",
22
+ "إنْتَهَى",
23
+ "أُنْظِرُوا",
24
+ "أَلِأَوْلاَدْ",
25
+ "أَيْضًا",
26
+ "بِالطَّبْعِ",
27
+ "بِالْمُنَاسَبَةِ",
28
+ "بِبَعْضٍ",
29
+ "بِخُصوصِ",
30
+ "بِخَيْرٍ",
31
+ "بَرْنامَجً",
32
+ "بَعْضَهُمْ",
33
+ "أَلِبَقاءٍ",
34
+ "بِمُجَرَّدٍ",
35
+ "بُؤْرَةً",
36
+ "بَيْنَما",
37
+ "تَارِيخً",
38
+ "تَبْحَثُ",
39
+ "تَبْقَى",
40
+ "تَتَّصِلُ",
41
+ "تَصْوِيرً",
42
+ "تُفْضِلُ",
43
+ "الثَّالِثَةَ",
44
+ "ثَانَوِيًّ",
45
+ "ثَعْلَبً",
46
+ "جَاءَ",
47
+ "جَزِيرَةً",
48
+ "جَمِيلَةً",
49
+ "جَيِّدً",
50
+ "حادِثَةً",
51
+ "حَجْمً",
52
+ "الْحَديثَ",
53
+ "حُسْنًا",
54
+ "حَقِيبَةً",
55
+ "أَلْحَقِيقَةٌ",
56
+ "حَقِيقِيَّةٌ",
57
+ "الحَياةُ",
58
+ "خَائِفٌ",
59
+ "خَائِفَةٌ",
60
+ "خَشِبَ",
61
+ "خِلَالَ",
62
+ "دَائِمَا",
63
+ "دَرَجَةٌ",
64
+ "دُكْتورٌ",
65
+ "ذاكِرَتُكَ",
66
+ "الذِّراعُ",
67
+ "ذَكاءٌ",
68
+ "ذَلِكَ",
69
+ "الذَّهَابُ",
70
+ "ذِئْبٌ",
71
+ "رَائِعٌ",
72
+ "رَغَمَ",
73
+ "رِفاقٌ",
74
+ "رُؤْيَةٌ",
75
+ "رَئِيسٌ",
76
+ "زَواجٌ",
77
+ "سَاعَةٌ",
78
+ "سَعِيدٌ",
79
+ "سنواتٌ",
80
+ "سَيَّارَةٌ",
81
+ "شَاطِئٌ",
82
+ "شَخَصَ",
83
+ "شَخْصِيَّةٌ",
84
+ "شَمِس",
85
+ "شُؤُونٌ",
86
+ "شَيْءٌ",
87
+ "الشَّيْءُ",
88
+ "صَحِيحٌ",
89
+ "صَدِيقِي",
90
+ "صَغِيرٌ",
91
+ "صَفْحَةٌ",
92
+ "صُنْدُوقٌ",
93
+ "ضَابِطٌ",
94
+ "الضَّرُورَةُ",
95
+ "الضَّوْءُ",
96
+ "ضَوْضَاءُ",
97
+ "الطَّاقَةُ",
98
+ "الطَّائِرَةُ",
99
+ "طَبِيبٌ",
100
+ "ظَلامٌ",
101
+ "الْعَالَمُ",
102
+ "عَائِلَتُي",
103
+ "الْعَرَبِيَّةُ",
104
+ "عَزِيزَتُي",
105
+ "الْعَشَاءُ",
106
+ "عَظِيمٌ",
107
+ "عَلَى",
108
+ "غَاضَبَ",
109
+ "الْغَدَاءُ",
110
+ "غُرْفَةٌ",
111
+ "الْفَتَاةُ",
112
+ "فَخَوِرَ",
113
+ "فَرَيَّقَ",
114
+ "الْفَضَاءُ",
115
+ "فَضَلَكَ",
116
+ "فَقَطُّ",
117
+ "فَوَائِدُ",
118
+ "فِي",
119
+ "الْقَادِمَةُ",
120
+ "قَائِدٌ",
121
+ "قَائِمَةٌ",
122
+ "الْقَبْضُ",
123
+ "قَبْلَ",
124
+ "قِرَاءةٌ",
125
+ "قِصَّةٌ",
126
+ "قَضِيَّةٌ",
127
+ "قَلِيلَا",
128
+ "قَلِيلَةٌ",
129
+ "كِتَابٌ",
130
+ "كَثِيرٌ",
131
+ "كَيْفً",
132
+ "لَا",
133
+ "اللَّحْمُ",
134
+ "لِطَيَّفَ",
135
+ "لُعْبَةٌ",
136
+ "اللِّقَاءُ",
137
+ "لَقَدْ",
138
+ "لِلْغَايَةِ",
139
+ "لَوْحَةٌ",
140
+ "لُؤْلُؤٌ",
141
+ "اللَّيْلَةُ",
142
+ "مَاذَا",
143
+ "الْمَاضِي",
144
+ "مَجْمُوعَةٌ",
145
+ "مَحْظُوظٌ",
146
+ "الْمَدْرَسَةُ",
147
+ "مُدْهِشٌ",
148
+ "مَرْحَبًا",
149
+ "مَرِيضٌ",
150
+ "مَسَاءَ",
151
+ "مُسَاعَدَةٌ",
152
+ "مُسْتَشْفى",
153
+ "الْمُسْتَقْبَلُ",
154
+ "مَسْرُورٌ",
155
+ "مَسْؤُولِيَّةٌ",
156
+ "مُشَاهِدَةٌ",
157
+ "مُشَكَّلَةٌ",
158
+ "مُضَاعَفَةٌ",
159
+ "مَطْعَمٌ",
160
+ "مَعً",
161
+ "مَعْلُومَاتٌ",
162
+ "مِغْنَاطِيسٌ",
163
+ "مَفَاتِيحُ",
164
+ "مُفَاجِئٌ",
165
+ "الْمُفَضَّلُ",
166
+ "مَقْرُوءٌ",
167
+ "مَكَانٌ",
168
+ "مُمَارَسَةٌ",
169
+ "مِنْ",
170
+ "مُنْخَفِضٌ",
171
+ "الْمَنْزِلُ",
172
+ "مُؤَدَّبٌ",
173
+ "مُوسِيقَى",
174
+ "مَوْضُوعٌ",
175
+ "مؤقتة",
176
+ "مُؤْمِنٌ",
177
+ "مِينَاءٌ",
178
+ "النَّاسُ",
179
+ "نَافِذَةٌ",
180
+ "نَصَائِحُ",
181
+ "الْهَاتِفُ",
182
+ "هَادِئٌ",
183
+ "هُدُوءٌ",
184
+ "هَذَا",
185
+ "هَلْ",
186
+ "هُنَالِكَ",
187
+ "هُوَ",
188
+ "هَؤُلَاءِ",
189
+ "هِي",
190
+ "هَيْئَةٌ",
191
+ "وَاحِدَةٌ",
192
+ "وَاضِحَةٌ",
193
+ "وَضُعَ",
194
+ "وَظِيفَةٌ",
195
+ "الْوَقْتُ",
196
+ "إِلَى",
197
+ "يَبْدُو",
198
+ "يَحْدُثُ",
199
+ "يَعْتَقِدُونَ",
200
+ "يَفْتَرِضُ",
201
+ "يُمْكِنُنِي"
202
+ ],
203
+ "eng": [
204
+ "the",
205
+ "of",
206
+ "and",
207
+ "a",
208
+ "to",
209
+ "in",
210
+ "is",
211
+ "you",
212
+ "that",
213
+ "it",
214
+ "he",
215
+ "was",
216
+ "for",
217
+ "on",
218
+ "are",
219
+ "as",
220
+ "with",
221
+ "his",
222
+ "they",
223
+ "I",
224
+ "at",
225
+ "be",
226
+ "this",
227
+ "have",
228
+ "from",
229
+ "or",
230
+ "one",
231
+ "had",
232
+ "by",
233
+ "word",
234
+ "but",
235
+ "not",
236
+ "what",
237
+ "all",
238
+ "were",
239
+ "we",
240
+ "when",
241
+ "your",
242
+ "can",
243
+ "said",
244
+ "there",
245
+ "use",
246
+ "an",
247
+ "each",
248
+ "which",
249
+ "she",
250
+ "do",
251
+ "how",
252
+ "their",
253
+ "if",
254
+ "will",
255
+ "up",
256
+ "other",
257
+ "about",
258
+ "out",
259
+ "many",
260
+ "then",
261
+ "them",
262
+ "these",
263
+ "so",
264
+ "some",
265
+ "her",
266
+ "would",
267
+ "make",
268
+ "like",
269
+ "him",
270
+ "into",
271
+ "time",
272
+ "has",
273
+ "look",
274
+ "two",
275
+ "more",
276
+ "write",
277
+ "go",
278
+ "see",
279
+ "number",
280
+ "no",
281
+ "way",
282
+ "could",
283
+ "people",
284
+ "my",
285
+ "than",
286
+ "first",
287
+ "water",
288
+ "been",
289
+ "call",
290
+ "who",
291
+ "oil",
292
+ "its",
293
+ "now",
294
+ "find",
295
+ "long",
296
+ "down",
297
+ "day",
298
+ "did",
299
+ "get",
300
+ "come",
301
+ "made",
302
+ "may",
303
+ "part"
304
+ ]
305
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "sphinx.djs",
3
+ "version": "1.0.0",
4
+ "description": "This package was made to annoy users in discord, Made it because people kept asking for it.",
5
+ "main": "inedx.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "discord.js",
11
+ "broadcast"
12
+ ],
13
+ "type": "module",
14
+ "author": "Sphinx",
15
+ "license": "ISC",
16
+ "dependencies": {
17
+ "@discordjs/builders": "^1.1.0",
18
+ "axios": "^0.27.2"
19
+ }
20
+ }