-
Notifications
You must be signed in to change notification settings - Fork 0
/
autopfpnew2.py
179 lines (154 loc) · 5.85 KB
/
autopfpnew2.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Made By @Nihinivi Keep Credits If You Are Goanna Kang This Lol
# And Thanks To The Creator Of Autopic This Script Was Made from Snippets From That Script
# Usage .gamerpfp Im Not Responsible For Any Ban caused By This
import asyncio
import os
import random
import re
import urllib
import requests
from telethon.tl import functions
COLLECTION_STRING1 = [
"awesome-batman-wallpapers",
"batman-arkham-knight-4k-wallpaper",
"batman-hd-wallpapers-1080p",
"the-joker-hd-wallpaper",
"dark-knight-joker-wallpaper",
]
COLLECTION_STRING2 = [
"thor-wallpapers",
"thor-wallpaper",
"thor-iphone-wallpaper",
"thor-wallpaper-hd",
]
COLLECTION_STRING3 = [
"robert-downey-jr-iron-man-wallpaper",
"iron-man-hd-wallpapers-1080p",
"joker-iphone-6-wallpaper",
"ffxiv-heavensward-wallpaper",
]
COLLECTION_STRING4 = [
"indian-god-images-wallpapers",
"indian-independence-day-hd-pic-wallpaper-2018",
"fringe-wallpaper",
"abstract-art-wallpaper-hd",
]
async def animeppbat():
rnd = random.randint(0, len(COLLECTION_STRING1) - 1)
pack = COLLECTION_STRING1[rnd]
pc = requests.get("http://getwallpapers.com/collection/" + pack).text
f = re.compile(r"/\w+/full.+.jpg")
f = f.findall(pc)
fy = "http://getwallpapers.com" + random.choice(f)
if not os.path.exists("f.ttf"):
urllib.request.urlretrieve(
"https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
"f.ttf",
)
urllib.request.urlretrieve(fy, "donottouch.jpg")
async def animeppthor():
rnd = random.randint(0, len(COLLECTION_STRING2) - 1)
pack = COLLECTION_STRING2[rnd]
pc = requests.get("http://getwallpapers.com/collection/" + pack).text
f = re.compile(r"/\w+/full.+.jpg")
f = f.findall(pc)
fy = "http://getwallpapers.com" + random.choice(f)
if not os.path.exists("f.ttf"):
urllib.request.urlretrieve(
"https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
"f.ttf",
)
urllib.request.urlretrieve(fy, "donottouch.jpg")
async def animeppiron():
rnd = random.randint(0, len(COLLECTION_STRING3) - 1)
pack = COLLECTION_STRING3[rnd]
pc = requests.get("http://getwallpapers.com/collection/" + pack).text
f = re.compile(r"/\w+/full.+.jpg")
f = f.findall(pc)
fy = "http://getwallpapers.com" + random.choice(f)
if not os.path.exists("f.ttf"):
urllib.request.urlretrieve(
"https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
"f.ttf",
)
urllib.request.urlretrieve(fy, "donottouch.jpg")
async def animeppind():
rnd = random.randint(0, len(COLLECTION_STRING4) - 1)
pack = COLLECTION_STRING4[rnd]
pc = requests.get("http://getwallpapers.com/collection/" + pack).text
f = re.compile(r"/\w+/full.+.jpg")
f = f.findall(pc)
fy = "http://getwallpapers.com" + random.choice(f)
if not os.path.exists("f.ttf"):
urllib.request.urlretrieve(
"https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
"f.ttf",
)
urllib.request.urlretrieve(fy, "donottouch.jpg")
@bot.on(admin_cmd(pattern="batmanpfp$"))
async def main(event):
await event.edit("Starting batman Profile Pic.") # Owner @NihiNivi
while True:
await animeppbat()
file = await event.client.upload_file("donottouch.jpg")
await event.client(
functions.photos.DeletePhotosRequest(
await event.client.get_profile_photos("me", limit=1)
)
)
await event.client(functions.photos.UploadProfilePhotoRequest(file))
os.system("rm -rf donottouch.jpg")
await asyncio.sleep(120) # Edit this to your required needs
@bot.on(admin_cmd(pattern="thorpfp$"))
async def main(event):
await event.edit("Starting thor Profile Pic.") # Owner @NihiNivi
while True:
await animeppthor()
file = await event.client.upload_file("donottouch.jpg")
await event.client(
functions.photos.DeletePhotosRequest(
await event.client.get_profile_photos("me", limit=1)
)
)
await event.client(functions.photos.UploadProfilePhotoRequest(file))
os.system("rm -rf donottouch.jpg")
await asyncio.sleep(120) # Edit this to your required needs
@bot.on(admin_cmd(pattern="ironmanpfp$"))
async def main(event):
await event.edit("Starting ironman Profile Pic.") # Owner @NihiNivi
while True:
await animeppiron()
file = await event.client.upload_file("donottouch.jpg")
await event.client(
functions.photos.DeletePhotosRequest(
await event.client.get_profile_photos("me", limit=1)
)
)
await event.client(functions.photos.UploadProfilePhotoRequest(file))
os.system("rm -rf donottouch.jpg")
await asyncio.sleep(120) # Edit this to your required needs
@bot.on(admin_cmd(pattern="indianpfp$"))
async def main(event):
await event.edit("Starting indian Profile Pic.") # Owner @NihiNivi
while True:
await animeppind()
file = await event.client.upload_file("donottouch.jpg")
await event.client(
functions.photos.DeletePhotosRequest(
await event.client.get_profile_photos("me", limit=1)
)
)
await event.client(functions.photos.UploadProfilePhotoRequest(file))
os.system("rm -rf donottouch.jpg")
await asyncio.sleep(120) # Edit this to your required needs
CMD_HELP.update(
{
"autopfp": """**Plugin : **`autopfp`
**Commands found in autopfp are **
• `.batmanpfp`
• `.thorpfp`
• `.ironmanpfp`
• `.indianpfp`
**Function : **__Changes your profile pic every 2 minutes with the command you used(mean the batman of thor)__"""
}
)