diff --git a/cryptexctl/modules-mirror/.gitignore b/cryptexctl/modules-mirror/.gitignore deleted file mode 100644 index 0dbf2f2..0000000 --- a/cryptexctl/modules-mirror/.gitignore +++ /dev/null @@ -1,170 +0,0 @@ -# ---> Python -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - diff --git a/cryptexctl/modules-mirror/README.md b/cryptexctl/modules-mirror/README.md deleted file mode 100644 index 82e4c2d..0000000 --- a/cryptexctl/modules-mirror/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# modules - diff --git a/cryptexctl/modules-mirror/SomethingCreatingScriptErrors.py b/cryptexctl/modules-mirror/SomethingCreatingScriptErrors.py deleted file mode 100644 index 91f0a17..0000000 --- a/cryptexctl/modules-mirror/SomethingCreatingScriptErrors.py +++ /dev/null @@ -1,53 +0,0 @@ -__version__ = (0, 0, 2) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# something.py -# meta developer: @systemxplore -# scope: hikka_only -from telethon.tl.functions.messages import SendMediaRequest -from telethon.tl.types import InputMediaPhotoExternal -from .. import loader, utils - - -@loader.tds -class ScriptErrorMod(loader.Module): - strings = {"name": "ScriptErrorSender"} - - async def client_ready(self, client, db): - self.client = client - - @loader.command() - async def скриптовыеошибки(self, message): - image_url = "https://0x0.st/s/57tTFWzUT0tc4HmuG75z_Q/XnMz.jpg" - caption = "⚠️Что-то создает скриптовые ошибки" - - reply_to = await message.get_reply_message() - - try: - await self.client( - SendMediaRequest( - peer=message.chat_id, - media=InputMediaPhotoExternal(url=image_url), - message=caption, - reply_to_msg_id=reply_to.id if reply_to else None - ) - ) - except Exception as e: - await utils.answer(message, f"⚠️Что-то создает скриптовые ошибки") - - # Удаляем команду после выполнения - await message.delete() diff --git a/cryptexctl/modules-mirror/actually.py b/cryptexctl/modules-mirror/actually.py deleted file mode 100644 index 5fc8f71..0000000 --- a/cryptexctl/modules-mirror/actually.py +++ /dev/null @@ -1,44 +0,0 @@ -__version__ = (2, 0, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# actually.py -# meta developer: @systemxplore -# scope: hikka_only -# scope: hikka_min 1.6.3 -from .. import loader, utils - -class ActuallyMod(loader.Module): - """ehm, actually🤓️.""" - strings = { - "name": "Actually", - "example_usage": "Используйте: .actually ur text" - } - - @loader.command() - async def actually(self, message): - """ehm, actually'""" - args = utils.get_args_raw(message) - if not args: - await utils.answer(message, self.strings["example_usage"]) - return - - # Формируем ответ - formatted_text = f"ehm,actually {args} {'🤓' * 10}" - - # Отправляем текст и удаляем команду - await message.respond(formatted_text) - await message.delete() diff --git a/cryptexctl/modules-mirror/avaclone.py b/cryptexctl/modules-mirror/avaclone.py deleted file mode 100644 index 1a7a751..0000000 --- a/cryptexctl/modules-mirror/avaclone.py +++ /dev/null @@ -1,101 +0,0 @@ -__version__ = (1, 1, 2) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# avaclone.py -# meta developer: @systemxplore -# scope: hikka_only -# scope: hikka_min 1.6.3 - -import asyncio -from telethon.tl.functions.photos import UploadProfilePhotoRequest -from telethon.errors.rpcerrorlist import PhotoCropSizeSmallError, FilePartsInvalidError -from telethon.tl.types import InputFile -from .. import loader, utils - -class AvaCloneMod(loader.Module): - """Устанавливает фото/видео/гиф аватарку многократно.\nОсторожно: возможен бан или флудвейт.""" - strings = {"name": "AvaClone"} - - @loader.command() - async def avaclone(self, message): - """ - Устанавливает аватарку указанное количество раз. - Используйте: .avaclone <количество> [ответ на файл/ссылка] - """ - args = utils.get_args(message) - if len(args) < 1: - await utils.answer(message, "Укажите количество раз и прикрепите файл.") - return - - try: - count = int(args[0]) - if count <= 0: - raise ValueError - except ValueError: - await utils.answer(message, "Некорректное количество раз.") - return - - reply = await message.get_reply_message() - media = None - - if reply and reply.media: - media = await self.client.download_media(reply.media) - elif len(args) > 1: - media = args[1] - else: - await utils.answer(message, "Ответьте на файл или укажите ссылку на файл.") - return - - extension = media.split(".")[-1].lower() - if extension not in ["jpg", "jpeg", "png", "gif", "mp4"]: - await utils.answer(message, "❌ Формат не поддерживается. Используйте JPG, PNG, GIF или MP4.") - return - - success_count = 0 - for i in range(count): - try: - uploaded_file = await self.client.upload_file(media) - if extension in ["gif", "mp4"]: - await self.client(UploadProfilePhotoRequest( - file=InputFile( - id=uploaded_file.id, - parts=uploaded_file.parts, - name=media, - md5_checksum=uploaded_file.md5_checksum - ) - )) - else: - await self.client(UploadProfilePhotoRequest(file=uploaded_file)) - success_count += 1 - await asyncio.sleep(2) - except PhotoCropSizeSmallError: - await utils.answer(message, "❌ Файл слишком маленький.") - break - except FilePartsInvalidError: - await utils.answer(message, "❌ Неверный файл.") - break - except Exception as e: - await utils.answer(message, f"Ошибка: {e}") - break - - if success_count > 0: - await utils.answer( - message, - f"✅ Установлено {success_count} раз(а). Возможен флудвейт, подождите 3 минуты перед следующим использованием." - ) - else: - await utils.answer(message, "❌ Не удалось установить аватарку.") \ No newline at end of file diff --git a/cryptexctl/modules-mirror/full.txt b/cryptexctl/modules-mirror/full.txt deleted file mode 100644 index 71df64a..0000000 --- a/cryptexctl/modules-mirror/full.txt +++ /dev/null @@ -1,11 +0,0 @@ -actually -avaclone -premium_emoji_id -randomtrack -zovmodule -овощерезка -сланцы2 -notesmod -SomethingCreatingScriptErrors -forgotboard -komarumod \ No newline at end of file diff --git a/cryptexctl/modules-mirror/komarumod.py b/cryptexctl/modules-mirror/komarumod.py deleted file mode 100644 index 08db613..0000000 --- a/cryptexctl/modules-mirror/komarumod.py +++ /dev/null @@ -1,33 +0,0 @@ -__version__ = (2, 0, 0) -# meta developer: @wmodules - -from .. import loader, utils -import random -from telethon.tl.types import InputMessagesFilterGif - -class KomaruMod(loader.Module): - """Достает рандомную гифку из @komarugif\n канал заменил @systemxplore, оригинальный разработчик: @wmodules""" - - strings = {"name": "KomaruMod v2"} - - async def client_ready(self, client, db): - self.client = client - - async def komarugifcmd(self, message): - """Рандомная гифка""" - channel = "@komarugif" - gifs = [msg async for msg in self.client.iter_messages(channel, filter=InputMessagesFilterGif)] - if not gifs: - await message.edit("Нет доступных GIF-ов в канале!") - return - - random_gif = random.choice(gifs) - reply_to = message.reply_to_msg_id - - await self.client.send_file( - message.chat_id, - random_gif, - reply_to=reply_to - ) - - await message.delete() diff --git a/cryptexctl/modules-mirror/notesmod.py b/cryptexctl/modules-mirror/notesmod.py deleted file mode 100644 index c77a981..0000000 --- a/cryptexctl/modules-mirror/notesmod.py +++ /dev/null @@ -1,109 +0,0 @@ -__version__ = (1, 0, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# notesmod.py -# meta developer: @systemxplore -# scope: hikka_only -import os -from .. import loader, utils - - -@loader.tds -class NotesFileMod(loader.Module): - """Модуль для заметок с хранением в файлах""" - strings = {"name": "NotesFile"} - - def __init__(self): - self.notes_dir = "notes" - - async def client_ready(self, client, db): - self.client = client - - if not os.path.exists(self.notes_dir): - os.makedirs(self.notes_dir) - - @loader.command() - async def noteadd(self, message): - """ - Добавить заметку. - Использование: .noteadd #tag <текст> - """ - args = utils.get_args_raw(message) - if not args.startswith("#"): - await utils.answer(message, "❌ Укажите тег заметки, начиная с `#`.") - return - - try: - tag, text = args.split(" ", 1) - except ValueError: - await utils.answer(message, "❌ Укажите текст заметки после тега.") - return - - note_file = os.path.join(self.notes_dir, f"{tag[1:]}.txt") - with open(note_file, "w", encoding="utf-8") as f: - f.write(text) - - await utils.answer(message, f"✅ Заметка `{tag}` сохранена.") - - @loader.command() - async def notedelete(self, message): - """ - Удалить заметку. - Использование: .notedelete #tag - """ - tag = utils.get_args_raw(message) - if not tag.startswith("#"): - await utils.answer(message, "❌ Укажите тег заметки, начиная с `#`.") - return - - note_file = os.path.join(self.notes_dir, f"{tag[1:]}.txt") - if os.path.exists(note_file): - os.remove(note_file) - await utils.answer(message, f"✅ Заметка `{tag}` удалена.") - else: - await utils.answer(message, f"❌ Заметка `{tag}` не найдена.") - - @loader.command() - async def noteview(self, message): - """ - Просмотреть заметку. - Использование: .noteview #tag - """ - tag = utils.get_args_raw(message) - if not tag.startswith("#"): - await utils.answer(message, "❌ Укажите тег заметки, начиная с `#`.") - return - - note_file = os.path.join(self.notes_dir, f"{tag[1:]}.txt") - if os.path.exists(note_file): - with open(note_file, "r", encoding="utf-8") as f: - text = f.read() - await utils.answer(message, f"📝 Заметка `{tag}`:\n\n{text}") - else: - await utils.answer(message, f"❌ Заметка `{tag}` не найдена.") - - @loader.command() - async def notelist(self, message): - """ - Показать список всех заметок. - """ - files = os.listdir(self.notes_dir) - if not files: - await utils.answer(message, "📋 Нет сохранённых заметок.") - else: - notes_list = "\n".join(f"• `#{os.path.splitext(file)[0]}`" for file in files) - await utils.answer(message, f"📋 Список заметок:\n\n{notes_list}") diff --git a/cryptexctl/modules-mirror/premium_emoji_id.py b/cryptexctl/modules-mirror/premium_emoji_id.py deleted file mode 100644 index 4910b39..0000000 --- a/cryptexctl/modules-mirror/premium_emoji_id.py +++ /dev/null @@ -1,58 +0,0 @@ -__version__ = (1, 0, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# premium_emoji_id.py -# meta developer: @systemxplore -# scope: hikka_only - -from telethon.tl.types import MessageEntityCustomEmoji -from .. import loader, utils - -class GetPremiumEmojiID(loader.Module): - """Получение ID премиум-эмодзи""" - strings = {"name": "PremiumEmojiID"} - - @loader.command() - async def getemoji_id(self, message): - """ - Получает ID премиум-эмодзи из сообщения - Использование: .getemoji_id <эмодзи> - """ - args = utils.get_args_raw(message) - if not args: - await utils.answer( - message, "❌ Пожалуйста, добавьте премиум-эмодзи после команды." - ) - return - - entities = message.entities - if not entities: - await utils.answer(message, "❌ Эмодзи не найдено.") - return - - for entity in entities: - if isinstance(entity, MessageEntityCustomEmoji): - emoji_id = entity.document_id - await utils.answer( - message, - f"✅ Найден премиум-эмодзи:\n\n" - f"💎 ID: `{emoji_id}`\n\n" - f"Теперь вы можете использовать его в своих модулях!", - ) - return - - await utils.answer(message, "❌ Это не премиум-эмодзи.") diff --git a/cryptexctl/modules-mirror/randomtrack.py b/cryptexctl/modules-mirror/randomtrack.py deleted file mode 100644 index 748ce12..0000000 --- a/cryptexctl/modules-mirror/randomtrack.py +++ /dev/null @@ -1,75 +0,0 @@ -__version__ = (1, 1, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# randomtrack.py -# meta developer: @systemxplore -# scope: hikka_only -# scope: hikka_min 1.6.3 - -import random -from telethon.tl.functions.messages import GetHistoryRequest -from telethon.tl.types import Message, MessageMediaDocument -from .. import loader, utils - -class RandomTrackMod(loader.Module): - """Отправляет случайный трек из указанного канала.""" - strings = {"name": "RandomTrack"} - - def __init__(self): - self.config = loader.ModuleConfig( - "MUSIC_CHANNEL_ID", 0, # ID канала с музыкой - lambda: "ID вашего канала с музыкой. Например: 123456789" - ) - - async def get_random_track(self, channel_id): - """Получает случайный трек из указанного канала по ID.""" - try: - history = await self.client(GetHistoryRequest( - peer=channel_id, - limit=100, # Загружает последние 100 сообщений - offset_date=None, - offset_id=0, - add_offset=0, - max_id=0, - min_id=0, - hash=0, - )) - - tracks = [ - msg for msg in history.messages - if isinstance(msg, Message) and isinstance(msg.media, MessageMediaDocument) - and msg.media.document.mime_type.startswith("audio") - ] - return random.choice(tracks) if tracks else None - except Exception as e: - return f"Ошибка при получении трека: {e}" - - @loader.command() - async def randomtrack(self, message): - """ - Отправляет случайный трек из вашего канала. - """ - channel_id = self.config["MUSIC_CHANNEL_ID"] - if not channel_id: - await utils.answer(message, "❌ Укажите ID канала с музыкой в .config") - return - - track = await self.get_random_track(channel_id) - if isinstance(track, Message): - await self.client.send_file(message.chat_id, track.media, caption=track.message or "") - else: - await utils.answer(message, f"❌ Не удалось получить трек. Причина: {track}") \ No newline at end of file diff --git a/cryptexctl/modules-mirror/zovmodule.py b/cryptexctl/modules-mirror/zovmodule.py deleted file mode 100644 index 1211baa..0000000 --- a/cryptexctl/modules-mirror/zovmodule.py +++ /dev/null @@ -1,95 +0,0 @@ -__version__ = (2, 1, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# leeter.py -# meta developer: @systemxplore -# scope: hikka_only -# scope: hikka_min 1.6.3 -from .. import loader, utils - -class LeeterMod(loader.Module): - """Тут либо гойда либо зов\nлибо ZOVишь либо leetируешь""" - strings = { - "name": "zover", - "enabled": "✅ Leeter включен.", - "disabled": "❌ Leeter выключен.", - "mode_leet": "⚙️ Режим установлен: Leet", - "mode_replace": "⚙️ Режим установлен: ZOV" - } # Исправлено: убрана лишняя закрывающая скобка - - def __init__(self): - self.config = loader.ModuleConfig( - "MODE", "leet", # Возможные значения: "leet" или "replace" - lambda: "Режим обработки сообщений: 'leet' для leet-стиля или 'replace' для zov." - ) - self.active = False - - async def client_ready(self, client, db): - self.client = client - - @loader.command() - async def leeter(self, message): - """Включить/выключить обработку сообщений.""" - self.active = not self.active - status = self.strings["enabled"] if self.active else self.strings["disabled"] - await utils.answer(message, status) - - @loader.command() - async def zovmode(self, message): - """Переключить режим: leet или zov.""" - new_mode = "leet" if self.config["MODE"] == "replace" else "replace" - self.config["MODE"] = new_mode - mode_message = self.strings["mode_leet"] if new_mode == "leet" else self.strings["mode_replace"] - await utils.answer(message, mode_message) - - async def watcher(self, message): - """Обрабатывает все ваши сообщения.""" - if not self.active or not message.out: - return - - text = message.raw_text - if self.config["MODE"] == "leet": - # Преобразование в leet-стиль - text = self.to_leet(text) - elif self.config["MODE"] == "replace": - # Замена z-Z, v-V, o-O - text = self.replace_chars(text) - - # Редактируем сообщение с преобразованным текстом - await message.edit(text) - - def to_leet(self, text): - """Преобразует текст в leet-стиль.""" - leet_map = { - 'а': '4', 'б': '6', 'в': '8', 'г': 'r', 'д': 'D', 'е': '3', 'ё': 'E', - 'ж': '>|<', 'з': '3', 'и': 'u', 'й': 'u`', 'к': 'K', 'л': 'JI', - 'м': 'M', 'н': 'H', 'о': '0', 'п': 'n', 'р': 'P', 'с': 'C', - 'т': '7', 'у': 'Y', 'ф': 'F', 'х': 'X', 'ц': 'U,', 'ч': '4', - 'ш': 'W', 'щ': 'W,', 'ъ': "'", 'ы': 'bl', 'ь': "'", 'э': '3', - 'ю': '10', 'я': '9', - 'a': '4', 'b': '8', 'c': '<', 'd': '[)', 'e': '3', 'f': '|=', - 'g': '6', 'h': '#', 'i': '1', 'j': '_|', 'k': '|<', 'l': '1', - 'm': '^^', 'n': '^/', 'o': '0', 'p': '|2', 'q': 'O_', 'r': '12', - 's': '5', 't': '7', 'u': '|_|', 'v': '\\/', 'w': '\\/\\/', 'x': '%', - 'y': '`/', 'z': '2' - } - return ''.join(leet_map.get(char.lower(), char) for char in text) - - def replace_chars(self, text): - """Заменяет z-Z, v-V, o-O в тексте.""" - replace_map = {'з': 'Z', 'З': 'Z', 'в': 'V', 'В': 'V', 'о': 'O', 'О': 'O'} - return ''.join(replace_map.get(char, char) for char in text) diff --git a/cryptexctl/modules-mirror/овощерезка.py b/cryptexctl/modules-mirror/овощерезка.py deleted file mode 100644 index c7888e5..0000000 --- a/cryptexctl/modules-mirror/овощерезка.py +++ /dev/null @@ -1,70 +0,0 @@ -__version__ = (1, 4, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# овощерезка.py -# meta developer: @systemxplore -# scope: hikka_only -# scope: hikka_min 1.6.3 - -import random -from telethon.tl.functions.messages import GetHistoryRequest -from telethon.tl.types import Message, MessageMediaPhoto -from .. import loader, utils - -class RandomPostMod(loader.Module): - """Отправляет случайный пост из p2 или pixelgang с картинками.""" - strings = {"name": "Овощерезка"} - - def __init__(self): - self.config = loader.ModuleConfig( - "POSTS_LIMIT", 50, # Количество постов для загрузки - lambda: "Количество постов для загрузки из каналов." - ) - - async def get_random_post(self, channel): - """Вгетаем фоточке из канала""" - try: - history = await self.client(GetHistoryRequest( - peer=channel, - limit=self.config["POSTS_LIMIT"], # Количество постов из .config - offset_date=None, - offset_id=0, - add_offset=0, - max_id=0, - min_id=0, - hash=0, - )) - messages = [ - msg for msg in history.messages - if isinstance(msg, Message) and isinstance(msg.media, MessageMediaPhoto) - ] - return random.choice(messages) if messages else None - except Exception as e: - return f"Ошибка при получении поста: {e}" - - @loader.command() - async def овощерезка(self, message): - """ - Отправляет случайный мемасек из p2 или pixelgang - """ - channel = random.choice(["pocobytes", "pixelgang"]) # Случайный выбор канала - post = await self.get_random_post(channel) - - if isinstance(post, Message): - await self.client.send_file(message.chat_id, post.media, caption=post.message or "") - else: - await utils.answer(message, f"❌ Не удалось получить пост. Причина: {post}") \ No newline at end of file diff --git a/cryptexctl/modules-mirror/сланцы2.py b/cryptexctl/modules-mirror/сланцы2.py deleted file mode 100644 index 36444fb..0000000 --- a/cryptexctl/modules-mirror/сланцы2.py +++ /dev/null @@ -1,56 +0,0 @@ -__version__ = (1, 1, 0) -# -# 88 -# ,d ,d 88 -# 88 88 88 -# ,adPPYba, 8b,dPPYba, 8b d8 8b,dPPYba, MM88MMM ,adPPYba, 8b, ,d8 ,adPPYba, MM88MMM 88 -# a8" "" 88P' "Y8 `8b d8' 88P' "8a 88 a8P_____88 `Y8, ,8P' a8" "" 88 88 -# 8b 88 `8b d8' 88 d8 88 8PP""""""" )888( 8b 88 88 -# "8a, ,aa 88 `8b,d8' 88b, ,a8" 88, "8b, ,aa ,d8" "8b, "8a, ,aa 88, 88 -# `"Ybbd8"' 88 Y88' 88`YbbdP"' "Y888 `"Ybbd8"' 8P' `Y8 `"Ybbd8"' "Y888 88 -# d8' 88 -# d8' 88 -# © Copyright 2024 -# https://t.me/cryptexctl -# -# 🔒 Licensed under the GNU AGPLv3 -# 🌐 https://www.gnu.org/licenses/agpl-3.0.html -# сланцы.py -# meta developer: @systemxplore -# scope: hikka_only -# scope: hikka_min 1.6.3 -import os -import requests -from .. import loader, utils - -class SlantsyMod(loader.Module): - """АХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\n""" - strings = { - "name": "Сланцы", - } - - def __init__(self): - # Путь, куда будет загружена картинка - self.image_path = "сланцы.jpeg" - self.image_url = "https://0x0.st/Xd9E.jpeg" - - async def client_ready(self, client, db): - self.client = client - self.download_image() - - def download_image(self): - """Скачивает изображение и сохраняет его на диск.""" - if not os.path.exists(self.image_path): # Проверяем, есть ли файл - response = requests.get(self.image_url) - with open(self.image_path, 'wb') as file: - file.write(response.content) - print(f"✅ Картинка успешно загружена: {self.image_path}") - else: - print(f"🖼️ Картинка уже существует: {self.image_path}") - - @loader.command() - async def этосланцычат(self, message): - """АХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\nАХХХ ЭТО ГОРЯЩИЕ СЛАНЦЫ ЧААТ\n""" - await self.client.send_file(message.chat_id, self.image_path) - # Удаляем сообщение с командой - await message.delete()