-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
81 lines (80 loc) · 4.61 KB
/
index.js
1
2
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
const fetch = require('node-fetch');
const chalk = require('chalk');
const fs = require('node:fs');
async function wait_ms(ms) {return new Promise(resolve => setTimeout(resolve, ms));};
function banner(){
console.log(chalk.magentaBright(`\n
█▄▄▄▄ ██ ▄█ ██▄ █ ▄▄ ████▄ █ █ █▀▄▀█ ▄███▄ ▄▄▄▄▀ ▄ █ ████▄ ██▄
█ ▄▀ █ █ ██ █ █ █ █ █ █ █ █ █ █ █ █▀ ▀ ▀▀▀ █ █ █ █ █ █ █
█▀▀▌ █▄▄█ ██ █ █ █▀▀▀ █ █ █ █ █ ▄ █ ██▄▄ █ ██▀▀█ █ █ █ █
█ █ █ █ ▐█ █ █ █ ▀████ ███▄ ███▄ █ █ █▄ ▄▀ █ █ █ ▀████ █ █
█ █ ▐ ███▀ █ ▀ ▀ █ ▀███▀ ▀ █ ███▀
▀ █ ▀ ▀ ▀
▀ \n
~ by ZenX Corp - ${chalk.white(`.gg/zCQ8jQ2GBf`)}
`));
};
banner();
if(!fs.existsSync('by-ZenX-gg-zCQ8jQ2GBf.zx')){
process.exit();
};
const tokens = [
"token"
];
const channels_ids = [
"channel_id1",
"channel_id2",
"channel_id3"
];
async function spam_encuesta() {
setInterval(async () => {
for (let token of tokens.values()) {
for (let channel of channels_ids.values()) {
const res = await fetch(`https://discord.com/api/v9/channels/${channel}/messages`,{
method:"POST",
headers:{
"Authorization":`${token}`,
"Content-Type":"application/json"
},
body:JSON.stringify({
"mobile_network_type":"unknown",
"content":"||@everyone||", // Contenido del mensaje .
"tts":false,
"flags":0,
"poll":
{"question":
{"text":"$ ZenX 0n t0p: discord.gg/zCQ8jQ2GBf"}, // Pregunta con 300 carácteres como maximo .
"answers":[
// Máximo 10 respuestas con 55 carácteres como máximo .
{"poll_media":{"text":"$ - $ - $ - $ - $ - $ - $ - $ - $"}}, //1
{"poll_media":{"text":"Invite: discord.gg/zCQ8jQ2GBf"}}, //2
{"poll_media":{"text":"$ ZenX Corp"}}, //3
{"poll_media":{"text":"$ - $ - $ - $ - $ - $ - $ - $ - $"}}, //4
{"poll_media":{"text":"Invite: discord.gg/zCQ8jQ2GBf"}}, //5
{"poll_media":{"text":"$ ZenX Corp"}}, //6
{"poll_media":{"text":"$ - $ - $ - $ - $ - $ - $ - $ - $"}}, //7
{"poll_media":{"text":"Invite: discord.gg/zCQ8jQ2GBf"}}, //8
{"poll_media":{"text":"$ ZenX Corp"}}, //9
{"poll_media":{"text":"$ - $ - $ - $ - $ - $ - $ - $ - $"}} //10
],
"allow_multiselect":true, // Respuesta múltiple -> true || false
"duration":1, // Duración en horas -> 1 || 4 || 8 || 24 || 72 || 168 || 336
"layout_type":1
}
})
});
const resJson = await res.json();
if(res.status === 429){
console.log(chalk.green(`[$] La encuesta fue enviada en el canal con ID ${chalk.white(channel)} con éxito.`));
} else {
console.log(chalk.red(`[$] Hubo un error al enviar la encuesta. Código de error: ${chalk.white(resJson['code'])} .`));
if(resJson['code'] === 20028){
await wait_ms(resJson['retry_after']);
console.log(chalk.cyan(`[$] Reintentando enviar la encuesta en ${chalk.white(resJson['retry_after'])} segundos...`));
};
};
};
};
}, 500);
};
spam_encuesta();