-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathscrs.py
More file actions
34 lines (25 loc) · 799 Bytes
/
scrs.py
File metadata and controls
34 lines (25 loc) · 799 Bytes
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
from .. import loader, utils
from telethon import events, errors, functions, types
def register(cb):
cb(ScrSpamMod())
class ScrSpamMod(loader.Module):
"""Screenshot Spammer by @KeyZenD"""
strings = {'name': 'ScrSpam'}
def __init__(self):
self.name = self.strings['name']
self._me = None
self._ratelimit = []
async def client_ready(self, client, db):
self._db = db
self._client = client
self.me = await client.get_me()
async def scrscmd(self, message):
""".scrs <amount>"""
a = 1
r = utils.get_args(message)
if r and r[0].isdigit():
a = int(r[0])
await message.edit("Screenshoting...")
for _ in range(a):
await message.client(functions.messages.SendScreenshotNotificationRequest(peer=message.to_id, reply_to_msg_id=message.id))
await message.delete()