-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdm.py
63 lines (45 loc) · 2.86 KB
/
dm.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
import discord, colorama, os
from colorama import Fore
from discord.ext import commands
class utils:
def rename(name):
os.system(f'title MASS-DMER - {name}')
token = input("Insert Token: ")
os.system('cls')
class massdm:
client = discord.Client()
client = commands.Bot(command_prefix='.', self_bot=True)
client.remove_command('help')
utils.rename(f"Connected to account, waiting for input...")
def banner():
print(f"""{Fore.LIGHTCYAN_EX}
███╗ ███╗ █████╗ ███████╗███████╗ ██████╗ ███╗ ███╗███████╗██████╗
████╗ ████║██╔══██╗██╔════╝██╔════╝ ██╔══██╗████╗ ████║██╔════╝██╔══██╗
██╔████╔██║███████║███████╗███████╗ ██║ ██║██╔████╔██║█████╗ ██████╔╝
██║╚██╔╝██║██╔══██║╚════██║╚════██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██╔══██╗
██║ ╚═╝ ██║██║ ██║███████║███████║ ██████╔╝██║ ╚═╝ ██║███████╗██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
-- Created by lxi --
{Fore.RESET}
""")
@client.event
async def on_connect():
friends = []
for i in massdm.client.user.friends:
friends.append(i)
massdm.banner()
input(f"{Fore.LIGHTGREEN_EX}Press any button to continue..")
messagetosend = input(f"{Fore.LIGHTGREEN_EX}Insert message to send: ")
print("Starting...")
utils.rename(f"Sending message to {len(friends)} friends..")
for i in friends:
try:
await i.send(messagetosend)
print(f"{Fore.LIGHTCYAN_EX}Message sent to: {i.name}{Fore.RESET}")
except Exception as err:
print(f"{Fore.RED} Error sending DM to {i.name}: {err}{Fore.RESET}")
input(f"{Fore.GREEN}Message have been dmed to {len(friends)} friends! Press any button to exit..")
utils.rename("Done sending messages")
def run(token):
massdm.client.run(token, bot=False)
massdm.run(token)