Files
userbot/modules/reactionspam.py
T
forust 7ba6bc44f2 chore(userbot): apply ruff check --fix and ruff format
- ruff check --fix: 210 auto-fixed errors (import sorting, trailing
  whitespace, unused imports, f-string fixups, deprecated annotations)
- ruff format: 104 files reformatted to consistent style
- 268 non-auto-fixable issues remain (S113 requests timeout, etc.)
2026-06-19 12:19:01 +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'}