-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsearchpic.py
More file actions
34 lines (28 loc) · 1.15 KB
/
searchpic.py
File metadata and controls
34 lines (28 loc) · 1.15 KB
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
# █ █ █ █▄▀ ▄▀█ █▀▄▀█ █▀█ █▀█ █ █
# █▀█ █ █ █ █▀█ █ ▀ █ █▄█ █▀▄ █▄█
# 🔒 Licensed under the GNU GPLv3
# 🌐 https://www.gnu.org/licenses/agpl-3.0.html
# 👤 https://t.me/hikamoru
# meta developer: @hikamorumods
# meta banner: https://raw.githubusercontent.com/AmoreForever/assets/master/Searchpic.jpg
# meta developer: @amoremods
from .. import loader, utils
from telethon.tl.types import Message
@loader.tds
class SearchPic(loader.Module):
strings = {"name": "SearchPic"}
@loader.unrestricted
async def spiccmd(self, message: Message):
"""Search picture"""
text = utils.get_args_raw(message)
await self.inline.form(
message=message,
text = f"🎑 Your pic found\n✍ Input argument: {text}",
reply_markup=[
[{"text": "Pic here", "url": f"https://yandex.uz/images/touch/search/?text={text}",}],
[{"text": "Close", "action": "close"}],
],
**(
{"photo": f"https://yandex.uz/images/touch/search/?text={text}"}
),
)