-
Notifications
You must be signed in to change notification settings - Fork 22
/
reactionspam.py
46 lines (41 loc) · 1.16 KB
/
reactionspam.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
import asyncio
from pyrogram import Client, filters
from pyrogram.raw import functions
from pyrogram.types import Message
from utils.misc import modules_help, prefix
from utils.scripts import format_exc
emojis = [
"👍",
"👎",
"❤️",
"🔥",
"🥰",
"👏",
"😁",
"🤔",
"🤯",
"😱",
"🤬",
"😢",
"🎉",
"🤩",
"🤮",
"💩",
]
@Client.on_message(filters.command("reactspam", prefix) & filters.me)
async def reactspam(client: Client, message: Message):
amount = int(message.command[1])
reaction = " ".join(message.command[2:])
await message.edit(f"<b>One moment...</b>")
for i in range(amount):
if reaction in emojis:
try:
await client.send_reaction(
message.chat.id, message.message_id - i, reaction
)
except Exception as e:
return await message.edit(format_exc(e))
else:
return await message.edit(f"<b>You can't use that emoji...</b>")
await message.edit(f"<b>Done!</b>")
modules_help["reactionspam"] = {"reactspam [amount]* [emoji]*": "spam reactions"}