-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
121 lines (103 loc) · 6.27 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
import random
import discord
import traceback
import os
from time import sleep
from discord.ext import commands
from colorama import Fore
from pystyle import *
config = {
# If set to True there will be a 5 second delay between sending pings. This makes it less likely that discord will terminate your account. If set to False then there will be no delay.
'ratelimit' : False
}
banner1 ='''
▄▄▄▄███▄▄▄▄ ▄████████ ▄████████ ▄████████
▄██▀▀▀███▀▀▀██▄ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ █▀ ███ █▀
███ ███ ███ ███ ███ ███ ███
███ ███ ███ ▀███████████ ▀███████████ ▀███████████
███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ▄█ ███ ▄█ ███
▀█ ███ █▀ ███ █▀ ▄████████▀ ▄████████▀
▄███████▄ ▄█ ███▄▄▄▄ ▄██████▄ ▄████████ ▄████████▄
███ ███ ███ ███▀▀▀██▄ ███ ███ ███ ███ ███ ███
███ ███ ███▌ ███ ███ ███ █▀ ███ █▀ ███ ███
███ ███ ███▌ ███ ███ ▄███ ▄███▄▄▄ ███▄▄▄▄██▀
▀█████████▀ ███▌ ███ ███ ▀▀███ ████▄ ▀▀███▀▀▀ █████████▄
███ ███ ███ ███ ███ ███ ███ █▄ ███▀▀▀▀███
███ ███ ███ ███ ███ ███ ███ ███ ███ ██
▄████▀ █▀ ▀█ █▀ ████████▀ ██████████ ███ ██'''
dark = Col.gray
purple = Colors.StaticMIX((Col.purple, Col.blue))
System.Size(100, 25)
System.Title("Mass Pinger - Made By Smug")
Cursor.HideCursor()
print(Colorate.Diagonal(Colors.DynamicMIX((purple, dark)), Center.XCenter(banner1)))
print()
token = input(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Enter your token: ')
def fetch_conf(e: str) -> str or bool | None:
return config.get(e)
def banner2():
print(Colorate.Diagonal(Colors.DynamicMIX((purple, dark)), Center.XCenter(banner1)))
print('\n')
def slowtype(text: str, speed: float, newLine=True):
for i in text:
print(i, end="", flush=True)
sleep(speed)
if newLine:
print()
intents = discord.Intents().all()
Luna = discord.Client()
Luna = commands.Bot(description="Luna Selfbot", command_prefix="$", self_bot=True, intents=intents, case_insensitive=True, guild_subscriptions=True)
def Main():
try:
Luna.run(token, bot=False)
except discord.errors.LoginFailure:
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Invalid Token')
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Press Enter To Exit . . .')
input()
exit()
except Exception as e:
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET}\nAn error occured while logging in:\n{"".join(traceback.format_exception(type(e), e, e.__traceback__))}\n')
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Press Enter To Exit . . .')
input()
exit()
@Luna.event
async def on_ready():
os.system('cls')
banner2()
slowtype(f'\n{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} SelfBot is online!', .02)
@Luna.event
async def on_command_error(self, error):
self.errors = commands.errors
if (isinstance(error, self.errors.BadArgument) or isinstance(error, commands.MissingRequiredArgument)
or isinstance(error, self.errors.PrivateMessageOnly) or isinstance(error, self.errors.CheckFailure)
or isinstance(error, self.errors.CommandNotFound)):
return
elif isinstance(error, self.errors.MissingPermissions):
print(f"{Fore.RED}Missing permissions {Fore.RESET}")
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Press Enter To Exit . . .')
input()
exit()
else:
print(f'{Fore.RED}\n\n{"".join(traceback.format_exception(type(error), error, error.__traceback__))}{Fore.RESET}')
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Press Enter To Exit . . .')
input()
exit()
@Luna.command(aliases=["mp"])
async def massping(ctx, amount: int):
await ctx.message.delete()
members = [m.mention for m in ctx.guild.members]
for _ in range(amount):
users = random.sample(members, len(ctx.guild.members))
await ctx.send(" ".join(users))
if fetch_conf('ratelimit'):
sleep(5)
else:
pass
print(f'{purple}[{Fore.RESET}{Fore.WHITE}+{Fore.RESET}{purple}]{Fore.RESET} Pinged {len(users)} Members!')
@Luna.command(aliases=["stop", "st", "shutdown"])
async def restart(ctx):
os.system("main.py")
if __name__ == '__main__':
Main()