Files
homelab/userbot/modules/reactionspam.py
T
forust 3c383db9a7
Deploy to Server / deploy (push) Has been cancelled
refactor: extract userbot to standalone repo, add as git submodule
userbot now lives at ssh://git@gitssh.forust.xyz:2221/forust/userbot.git
and is included in homelab as a submodule at userbot/
2026-06-19 15:39:00 +02:00

45 lines
1.0 KiB
Python

import random
from pyrogram import Client, enums, filters
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):
await message.edit('<b>One moment...</b>', parse_mode=enums.ParseMode.HTML)
try:
selected_emojis = random.sample(emojis, 3)
print(selected_emojis)
await client.send_reaction(
message.chat.id,
message_id=message.reply_to_message.id,
emoji=selected_emojis,
)
await message.delete()
except Exception as e:
return await message.edit_text(format_exc(e))
modules_help['reactionspam'] = {'reactspam [amount]* [emoji]*': 'spam reactions'}