<filename>selfbot.py
import discord, os, json,requests
from os import system,name
from discord.ext import commands
from discord.ext.commands import CommandNotFound
fObj = open('config.json')
ogdata = json.load(fObj)
deletes = ogdata['delete']
tokenn = ogdata['token']


# Check for token
# Remove this func if you are using a E-host
def tokus(tokn): 
  if name == 'nt':
      _ = system('cls')
  else:
      _ = system('clear')
  headers = {'Content-Type': 'application/json', 'authorization': tokn}
  url = "https://discordapp.com/api/v6/users/@me/library"
  r = requests.get(url, headers=headers)
  if r.status_code == 200:
      return tokn
  else:
    try:
      print("Invalid or no token provided:\n")
      tokkus = input("Enter your token\n")
      with open('config.json', 'r') as f:
        json_data = json.load(f)
        json_data['token'] = tokkus
        f.close()
      with open('config.json', 'w') as f:
        f.write(json.dumps(json_data, indent = 4, sort_keys=True))
        f.close()
        return tokkus
    except Exception as e:
      print(e)


token = tokus(tokenn)


async def pre(dortrox, message):
  fObj = open('config.json')
  ogdata = json.load(fObj)
  prefix = ogdata['prefix']
  return prefix

async def HookContent():
  fObj = open('config.json')
  ogdata = json.load(fObj)
  webhook_content = ogdata['webhook_content']
  return webhook_content

async def HookName():
  fObj = open('config.json')
  ogdata = json.load(fObj)
  webhook_name = ogdata['webhook_name']
  return webhook_name

async def Hook():
  fObj = open('config.json')
  ogdata = json.load(fObj)
  webhooks = ogdata['webhook']
  return webhooks

intents = discord.Intents().all()
dortrox = commands.Bot(
    command_prefix=pre,
    self_bot=True,
    help_command=None, 
    intents=intents, 
                    )

Help = ["NUKE COMMANDS", "FUN COMMANDS", "ACTIVITIES COMMANDS", "MAIN COMMANDS"]
Main = [f"purge: Delete messages from a channel  |  purge <amount here>", f"ping: Shows lantency  |  ping", f"hooks: Turn webhooks on & off  |  hooks", f"activityN: changes activity message  |  activity <message here>", f"hooksN: Changes webhooks name  |  hooksN <name here>", f"hooksC: Changes webhooks content  |  hooksC <content here>", f"roleN : Changes roles name  |  roleN <name here>", f"channelN: Changes channels name  |  channelN <name here>", f"prefix: Changes prefix  |  prefix <New prefix here>", f"guildN: Changes guild name  |  guildN <Name here>", f"ban: Turn ban On or Off  |  ban" ]
Nuke = [f"nuke: Blow up the server for you  |  nuke" ]
Activites = [f"stream: Change to streaming message and activity  |  stream <messsage here>", f"listen: Change to listening message and activity  |  listen <messsage here>", f"playing: Change to playing message and activity listen <message here>", f"watch: Change to watching message and activity  |  watch <message here>"]
Fun = f"""
```ini
[hastare]\n[otax]\n[danc]\n[langry]\n[hah]\n[owo]\n[lonely]\n[ahh]\n[bbye]\n[hahug]\n[hjump]\n[pat]\n[twerk]\n[nani]\n[love]\n[sesso]\n[jews]\n[cp]\n```
"""

for filename in os.listdir('./runs'):
    if filename.endswith('.py'):
        dortrox.load_extension(f'runs.{filename[:-3]}')

@dortrox.event
async def on_guild_channel_create(channel):
  webhooks = await Hook()
  if webhooks == "True":
    try: 
      webhook = await channel.create_webhook(name=await HookName())
    except Exception as e:
      pass
      
    for i in range(1):
      try:
        await webhook.send(content= await HookContent(), avatar_url='https://media.discordapp.net/attachments/853265428951072789/960967237022416906/nihon.vibe-20220329-0001.jpeg')
      except Exception as e:
        pass
  else:
    pass

@dortrox.event
async def on_command_error(ctx, error):
    if isinstance(error, CommandNotFound):
        return
    raise error

@dortrox.event
async def on_ready():
    if name == 'nt':
        _ = system('cls')
    else:
        _ = system('clear')
    print(f"""
                                    
                                  ▄████████  ▄█     ▄████████  ▄█  ███    █▄     ▄████████ 
                                  ███    ███ ███    ███    ███ ███  ███    ███   ███    ███ 
                                  ███    █▀  ███▌   ███    ███ ███▌ ███    ███   ███    █▀  
                                  ███        ███▌  ▄███▄▄▄▄██▀ ███▌ ███    ███   ███        
                                ▀███████████ ███▌ ▀▀███▀▀▀▀▀   ███▌ ███    ███ ▀███████████ 
                                         ███ ███  ▀███████████ ███  ███    ███          ███ 
                                   ▄█    ███ ███    ███    ███ ███  ███    ███    ▄█    ███ 
                                 ▄████████▀  █▀     ███    ███ █▀   ████████▀   ▄████████▀  
                                                    ███    ███                              
                                            Manipulating: {dortrox.user}  
                                                  Prefix: {ogdata['prefix']}                     
    """)



@dortrox.command()
async def help(ctx, content=None):
  try:
    await ctx.message.delete()
  except:
    pass

  h = """>>> **```ini
[S I R I U S SELFBOT]
```**\n""" 
  if content == None:
    h += """```diff
- Ｃａｔｅｇｏｒｙ
```\n\n\n"""
    for i in Help:
      h += f"""***```json
\"{i}\"
```***\n"""
    h += f'''```diff
+ help: To search for a specific category  |  Example : help <category name>
```\n\n'''
  elif content.lower() == "main":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [MAIN]"```\n\n'''
    for i in Main:  
      h += f"""```diff
+ {i}
```\n"""
    
  elif content.lower() == "nuke":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [NUKE]"```\n\n'''
    for i in Nuke:
      h += f"""```diff
+ {i}
```\n"""
  elif content.lower() == "fun":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [FUN]"```\n\n'''
    h += Fun
  elif content.lower() == "activities":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [Activity]"```\n\n'''
    for i in Activites:
      h += f"""```diff
+ {i}
```\n"""
  else:
    h += """```diff
- No Result
```"""

  await ctx.send(h, delete_after=deletes)

try:  
  dortrox.run(token, bot=False)
except discord.LoginFailure:
  print("Invalid token provide")

<filename>selfbot.py
import discord, os, json,requests
from os import system,name
from discord.ext import commands
from discord.ext.commands import CommandNotFound
fObj = open('config.json')
ogdata = json.load(fObj)
deletes = ogdata['delete']
tokenn = ogdata['token']


# Check for token
# Remove this func if you are using a E-host
def tokus(tokn): 
  if name == 'nt':
      _ = system('cls')
  else:
      _ = system('clear')
  headers = {'Content-Type': 'application/json', 'authorization': tokn}
  url = "https://discordapp.com/api/v6/users/@me/library"
  r = requests.get(url, headers=headers)
  if r.status_code == 200:
      return tokn
  else:
    try:
      print("Invalid or no token provided:\n")
      tokkus = input("Enter your token\n")
      with open('config.json', 'r') as f:
        json_data = json.load(f)
        json_data['token'] = tokkus
        f.close()
      with open('config.json', 'w') as f:
        f.write(json.dumps(json_data, indent = 4, sort_keys=True))
        f.close()
        return tokkus
    except Exception as e:
      print(e)


token = tokus(tokenn)


async def pre(dortrox, message):
  fObj = open('config.json')
  ogdata = json.load(fObj)
  prefix = ogdata['prefix']
  return prefix

async def HookContent():
  fObj = open('config.json')
  ogdata = json.load(fObj)
  webhook_content = ogdata['webhook_content']
  return webhook_content

async def HookName():
  fObj = open('config.json')
  ogdata = json.load(fObj)
  webhook_name = ogdata['webhook_name']
  return webhook_name

async def Hook():
  fObj = open('config.json')
  ogdata = json.load(fObj)
  webhooks = ogdata['webhook']
  return webhooks

intents = discord.Intents().all()
dortrox = commands.Bot(
    command_prefix=pre,
    self_bot=True,
    help_command=None, 
    intents=intents, 
                    )

Help = ["NUKE COMMANDS", "FUN COMMANDS", "ACTIVITIES COMMANDS", "MAIN COMMANDS"]
Main = [f"purge: Delete messages from a channel  |  purge <amount here>", f"ping: Shows lantency  |  ping", f"hooks: Turn webhooks on & off  |  hooks", f"activityN: changes activity message  |  activity <message here>", f"hooksN: Changes webhooks name  |  hooksN <name here>", f"hooksC: Changes webhooks content  |  hooksC <content here>", f"roleN : Changes roles name  |  roleN <name here>", f"channelN: Changes channels name  |  channelN <name here>", f"prefix: Changes prefix  |  prefix <New prefix here>", f"guildN: Changes guild name  |  guildN <Name here>", f"ban: Turn ban On or Off  |  ban" ]
Nuke = [f"nuke: Blow up the server for you  |  nuke" ]
Activites = [f"stream: Change to streaming message and activity  |  stream <messsage here>", f"listen: Change to listening message and activity  |  listen <messsage here>", f"playing: Change to playing message and activity listen <message here>", f"watch: Change to watching message and activity  |  watch <message here>"]
Fun = f"""
```ini
[hastare]\n[otax]\n[danc]\n[langry]\n[hah]\n[owo]\n[lonely]\n[ahh]\n[bbye]\n[hahug]\n[hjump]\n[pat]\n[twerk]\n[nani]\n[love]\n[sesso]\n[jews]\n[cp]\n```
"""

for filename in os.listdir('./runs'):
    if filename.endswith('.py'):
        dortrox.load_extension(f'runs.{filename[:-3]}')

@dortrox.event
async def on_guild_channel_create(channel):
  webhooks = await Hook()
  if webhooks == "True":
    try: 
      webhook = await channel.create_webhook(name=await HookName())
    except Exception as e:
      pass
      
    for i in range(1):
      try:
        await webhook.send(content= await HookContent(), avatar_url='https://media.discordapp.net/attachments/853265428951072789/960967237022416906/nihon.vibe-20220329-0001.jpeg')
      except Exception as e:
        pass
  else:
    pass

@dortrox.event
async def on_command_error(ctx, error):
    if isinstance(error, CommandNotFound):
        return
    raise error

@dortrox.event
async def on_ready():
    if name == 'nt':
        _ = system('cls')
    else:
        _ = system('clear')
    print(f"""
                                    
                                  ▄████████  ▄█     ▄████████  ▄█  ███    █▄     ▄████████ 
                                  ███    ███ ███    ███    ███ ███  ███    ███   ███    ███ 
                                  ███    █▀  ███▌   ███    ███ ███▌ ███    ███   ███    █▀  
                                  ███        ███▌  ▄███▄▄▄▄██▀ ███▌ ███    ███   ███        
                                ▀███████████ ███▌ ▀▀███▀▀▀▀▀   ███▌ ███    ███ ▀███████████ 
                                         ███ ███  ▀███████████ ███  ███    ███          ███ 
                                   ▄█    ███ ███    ███    ███ ███  ███    ███    ▄█    ███ 
                                 ▄████████▀  █▀     ███    ███ █▀   ████████▀   ▄████████▀  
                                                    ███    ███                              
                                            Manipulating: {dortrox.user}  
                                                  Prefix: {ogdata['prefix']}                     
    """)



@dortrox.command()
async def help(ctx, content=None):
  try:
    await ctx.message.delete()
  except:
    pass

  h = """>>> **```ini
[S I R I U S SELFBOT]
```**\n""" 
  if content == None:
    h += """```diff
- Ｃａｔｅｇｏｒｙ
```\n\n\n"""
    for i in Help:
      h += f"""***```json
\"{i}\"
```***\n"""
    h += f'''```diff
+ help: To search for a specific category  |  Example : help <category name>
```\n\n'''
  elif content.lower() == "main":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [MAIN]"```\n\n'''
    for i in Main:  
      h += f"""```diff
+ {i}
```\n"""
    
  elif content.lower() == "nuke":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [NUKE]"```\n\n'''
    for i in Nuke:
      h += f"""```diff
+ {i}
```\n"""
  elif content.lower() == "fun":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [FUN]"```\n\n'''
    h += Fun
  elif content.lower() == "activities":
    h += '''```json
"Ｃａｔｅｇｏｒｙ [Activity]"```\n\n'''
    for i in Activites:
      h += f"""```diff
+ {i}
```\n"""
  else:
    h += """```diff
- No Result
```"""

  await ctx.send(h, delete_after=deletes)

try:  
  dortrox.run(token, bot=False)
except discord.LoginFailure:
  print("Invalid token provide")

# Check for token # Remove this func if you are using a E-host ```ini [hastare]\n[otax]\n[danc]\n[langry]\n[hah]\n[owo]\n[lonely]\n[ahh]\n[bbye]\n[hahug]\n[hjump]\n[pat]\n[twerk]\n[nani]\n[love]\n[sesso]\n[jews]\n[cp]\n``` ▄████████  ▄█     ▄████████  ▄█  ███    █▄     ▄████████                                    ███    ███ ███    ███    ███ ███  ███    ███   ███    ███                                    ███    █▀  ███▌   ███    ███ ███▌ ███    ███   ███    █▀                                     ███        ███▌  ▄███▄▄▄▄██▀ ███▌ ███    ███   ███                                         ▀███████████ ███▌ ▀▀███▀▀▀▀▀   ███▌ ███    ███ ▀███████████                                           ███ ███  ▀███████████ ███  ███    ███          ███                                     ▄█    ███ ███    ███    ███ ███  ███    ███    ▄█    ███                                   ▄████████▀  █▀     ███    ███ █▀   ████████▀   ▄████████▀                                                       ███    ███                                                                           Manipulating: {dortrox.user}                                                     Prefix: {ogdata['prefix']} >>> **```ini [S I R I U S SELFBOT] ```**\n ```diff - Ｃａｔｅｇｏｒｙ ```\n\n\n ***```json \"{i}\" ```***\n ```diff + help: To search for a specific category  |  Example : help <category name> ```\n\n ```json "Ｃａｔｅｇｏｒｙ [MAIN]"```\n\n ```diff + {i} ```\n ```json "Ｃａｔｅｇｏｒｙ [NUKE]"```\n\n ```diff + {i} ```\n ```json "Ｃａｔｅｇｏｒｙ [FUN]"```\n\n ```json "Ｃａｔｅｇｏｒｙ [Activity]"```\n\n ```diff + {i} ```\n ```diff - No Result ```