mirror of
https://github.com/MuRuLOSE/limoka.git
synced 2026-06-18 07:04:19 +02:00
Commited backup
This commit is contained in:
22
Fl1yd/FTG-Modules/searchmodules.py
Normal file
22
Fl1yd/FTG-Modules/searchmodules.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from .. import loader, utils
|
||||
|
||||
|
||||
def register(cb):
|
||||
cb(SearchMod())
|
||||
|
||||
class SearchMod(loader.Module):
|
||||
"""Поиск контента на канале @ftgmodulesbyfl1yd"""
|
||||
strings = {'name': 'SearchModules'}
|
||||
|
||||
async def searchcmd(self, message):
|
||||
"""Используй .search <название>"""
|
||||
try:
|
||||
title = utils.get_args_raw(message)
|
||||
if not title:
|
||||
await message.edit("<b>Нет текста после команды.</b>")
|
||||
else:
|
||||
chat = message.input_chat
|
||||
await [i async for i in message.client.iter_messages("ftgmodulesbyfl1yd", search=title)][0].forward_to(chat)
|
||||
await message.delete()
|
||||
except:
|
||||
await message.edit("<b>Не удалось найти контент.</b>")
|
||||
Reference in New Issue
Block a user