forked from ULTRA-OP/ULTRA-X
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spam.py
98 lines (85 loc) · 3.21 KB
/
spam.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
# By LEGENDX22 🔥
#credits dc
# Kang with credits..
import asyncio
from asyncio import wait
from ULTRA import CMD_HELP
from ULTRA.events import register
@register(outgoing=True, pattern="^.tspam")
async def tmeme(e):
tspam = str(e.text[7:])
message = tspam.replace(" ", "")
for letter in message:
await e.respond(letter)
await e.delete()
@register(outgoing=True, pattern="^.spam")
async def spammer(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
message = e.text
counter = int(message[6:8])
spam_message = str(e.text[8:])
await asyncio.wait([e.respond(spam_message) for i in range(counter)])
await e.delete()
if LOGGER:
await e.client.send_message(
LOGGER_GROUP,
"#SPAM \n\n"
"Spam was executed successfully"
)
@register(outgoing=True, pattern="^.bigspam")
async def bigspam(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
message = e.text
counter = int(message[9:13])
spam_message = str(e.text[13:])
for i in range(1, counter):
await e.respond(spam_message)
await e.delete()
if LOGGER:
await e.client.send_message(
LOGGER_GROUP,
"#BIGSPAM \n\n"
"Bigspam was executed successfully"
)
@register(outgoing=True, pattern="^.mspam")
async def tiny_pic_spam(e):
reply = await e.get_reply_message()
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
message = e.text
text = message.split()
counter = int(text[1])
media = await e.client.download_media(reply)
for i in range(1, counter):
await e.client.send_file(e.chat_id, media)
await e.delete()
if LOGGER:
await e.client.send_message(
LOGGER_GROUP,
"#MEDIASPAM \n\n"
"MediaSpam was executed successfully boss"
)
@register(outgoing=True, pattern="^.delayspam (.*)")
async def spammer(e):
spamDelay = float(e.pattern_match.group(1).split(' ', 2)[0])
counter = int(e.pattern_match.group(1).split(' ', 2)[1])
spam_message = str(e.pattern_match.group(1).split(' ', 2)[2])
await e.delete()
for i in range(1, counter):
await e.respond(spam_message)
await asyncio.sleep(spamDelay)
if LOGGER:
await e.client.send_message(
LOGGER_GROUP, "#DelaySPAM\n"
"DelaySpam was executed successfully")
CMD_HELP.update(
{
"spam": ".spam <no of msgs> <your msg>"
"\nUsage: spams the current chat, the current limit for this is from 1 to 99.\n\n"
".bigspam <no of msgs> <your msg>"
"\nUsage: Spams the current chat, the current limit is above 100.\n\n"
".mspam <no of spam> (with reply to media)"
"\nUsage: Spams the current chat with number you did put in <no of spam>.\n\n"
".delayspam <delay time> <count> <msg>"
"\nUsage: Spams the current chat with with the input msgs with a delay time that has been given as its input.\n\n"
}
)