__version__ = (3, 2, 0) # _ _ _ _ # | | | | (_) | # | | ___ | |_ ___ ___ _| | __ # | | / _ \| __/ _ \/ __| | |/ / # | |___| (_) | || (_) \__ \ | < # \_____/\___/ \__\___/|___/_|_|\_\ # # © Copyright 2022 # # developed by @lotosiiik, @byateblan # 🔒 Licensed under the GNU AGPLv3 # 🌐 https://www.gnu.org/licenses/agpl-3.0.html # meta pic: https://static.whypodg.me/mods!bio.png # meta banner: https://mods.whypodg.me/badges/bio.jpg # scope: hikka_only # scope: hikka_min 1.2.10 # developer of basic module: @zeticsce # developer of Num: @trololo_1 # meta developer: @idiotcoders from .. import loader, utils # noqa import asyncio import contextlib import pytz import re re._MAXCACHE = 3000 import telethon from telethon.tl.types import MessageEntityTextUrl, Message from telethon.tl.functions.users import GetFullUserRequest import json as JSON from telethon.errors.rpcerrorlist import FloodWaitError from datetime import datetime, date, time import logging import types from ..inline.types import InlineCall import random import subprocess import string, pickle def validate_text(text: str): txt = text.replace("", "").replace("", "").replace("", "").replace("", "").replace("", "").replace("", "").replace("", "").replace("", "").replace("", "").replace("", "") return txt @loader.tds class BioMod(loader.Module): """ 💘 """ strings = { "name": "Bio", "not_reply": "💔 Реплая нет.", "not_args": "💔 Аргументов нет.", "nolink": "💔 Нет ссылки.", "hueta": "Ничего не могу понять..💔", "r.save": "💖 Жертва {} в зарлисте.\n" "💊 +{}{} био-ресурсов", "auto.save": "💘 Жертва {} в зарлисте.\n" "💊 {}+{} био-ресурсов.", "search": "💓 Жертва {} приносит:\n" "💊 +{} био-ресурсов.\n" "📆 Дата: {}", "nf": "💔 Не найдено! Скорее всего не бил, давай бей!", "no_user": "💔 Пользователь {} не существует.", "nous": "💔 Жертва или пользователь не существует.", "anf": "💔 некого искать..", "aicmd": "🥷🏻 {}\n" "🆔: @{}", "myid": "My 🆔: @{}", "guidedov": "💘 Юзабельность доверки:\n" "\n{0} бей | кус[ьайни] | зарази[тьть] " # 🔽 "| еб[ниажшь] | уеб[жиаошть] [1-10] (@id|@user|link)/" "\n{0} бей | кус[ьайни] | зарази[тьть] " # 🔽 "| еб[ниажшь] | уеб[жиаошть] [1-10] =" "\n{0} бей | кус[ьайни] | зарази[тьть] " # 🔽 "| еб[ниажшь] | уеб[жиаошть] [1-10] +" "\n{0} бей | кус[ьайни] | зарази[тьть] " # 🔽 "| еб[ниажшь] | уеб[жиаошть] [1-10] -" "\n{0} цен[ау] | вч[ек] (цена вакцины)" "\n{0} вак[цинау] | леч[ись] | хи[лльсяйинг] | лек[арство]" "\n{0} жертв[ыау] | еж[ау]" "\n{0} бол[езьни]" "\n{0} #лаб[уа] | %лаб[уа] | /лаб[уа]" "\n{0} увед[ыаомления] (+вирусы)" "\n{0} -вирус[ыа]\n\n" "〽️ Апгрейд навыков:\n" "{0} навык (0-5) или\n{0} чек навык (0-5)\n" " Например: {0} квалификация 4\n" "(улучшает квалификацию учённых на 4 ур.)\n\n" "〽️ Доступные навыки:\n" "🧪 Патоген (пат [огены])\n👨‍🔬 Квалификация (квал [ификацияула] | разраб [откау])\n" "🦠 Заразность (зз | зараз [аностьку])\n🛡 Иммунитет (иммун [итеткау])\n" "☠️ Летальность (летал [ьностькау])\n🕵️‍♂️ Безопасность (сб | служб [ау] | безопасно [сть])\n\n" "🔎 Поиск жертв в зарлисте:\n" "{0} з [ @id ] или\n" "{0} з [ реплай ]\n" "см. {1}config bio для настройки.", "dov": "🌘 {5}Дов сет [ id|реплай ] --- Добавить/удалить саппорта.\n" " ✨ Зайки в доверке:\n" "{0}\n\n" "🌘 {5}Дов ник ник --- Установить ник.\n Например: .Дов ник {3}.\n" " 🔰 Ник доверки: {1}\n\n" "🌘 {5}Дов пуск --- Запустить/Остановить.\n" " {2}\n" "Доступ открыт к:\n{4}", "zarlistHelp": "Как пользоваться зарлистом:\n\n" "По умолчанию, все новые жертвы автоматически заносятся в зарлист," " кроме, когда в сообщении ириса о заражении нету ссылки на жертву.\n\n" "Шаблоны для добавления жертвы:\n" "{0}зар @id 1.1к\n" "жд @id 1.1к\n\n" "Чтобы найти жертву используй:\n" "{0}зар @id/реплай ф\n" "{1} з @id/реплай\n" "жл @id/реплай\n\n" "Также, инфу о бонусе с жертвы можно увидеть рядом с именем при использовании команды {0}б", "user_rm": "💔 Помощник {} туда иго 😡.", "user_add": "💞 Помощник {} добавлен!", "wrong_nick": "📝 Введите ник.", "nick_add": "🔰 Ник доверки {} установлен!", "dov_start": "💓 Успешно запущено!", "dov_stop": "💔 Успешно остановлено.", "dov.wrong_args": "💔 Неизвестный аргумент.\n" "📝 Введите .дов для просмотра команд.", "wrong_id": "💔 Правильно 🆔 введи.", "ex": "💕 Исключение: {}", "wrong_ot-do": '💔 Используй правильно функцию "от-до".', "no_sargs": "💔 Не найдено совпадение в начале строк с аргументами.", "no_link": "💔 Ссылка не найдена.", "too_much_args": "💔 Кол-во аргументов больше одного, либо начинается не со знака @", "no_zar_reply": "💔 Нет реплая на сообщение ириса о заражении.", "empty_zar": "💔 Список заражений пуст.", "wrong_zar_reply": '💔 Реплай не на сообщение ириса о заражении "...подверг заражению..."', "wrong_cmd": "💔 Команда введена некорректно.", "empty_ex": "💔 Cписок исключений пуст.", "tids": "💞 Id'ы успешно извлечены.", "tzar": "💓 Заражения завершены.", "clrex": "💔 Список исключений очищен.", "zar_rm": "💔 Жертва {0} {1}удалена.", "exadd": "💔 Пользователь {} в исключениях.", "exrm": "💔 Пользователь {} удален.", "clrzar": "💔 Зарлист очищен.", "guide": "Помощь по модулю BioHelper:\n\n" "{0}biohelp дов 👈 Помощь по доверке\n" "{0}biohelp зарлист 👈 Помощь по зарлисту" } async def client_ready(self, client, db): self.db = db self.client = client #IDS if not self.db.get("NumMod", "exUsers", False): self.db.set("NumMod", "exUsers", []) if not self.db.get("NumMod", "infList", False): self.db.set("NumMod", "infList", {}) async def айcmd(self, message): """ [reply/arg] Получает айди пользователя. """ reply = await message.get_reply_message() args = utils.get_args(message) if not reply: if not args: user = await message.client.get_entity(message.sender_id) link = '{}'.format(user.username, user.first_name) if user.username else '{}'.format(user.id, user.first_name) return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) user = 0 if re.fullmatch(r"@\D\w{3,32}", args[0], flags=re.ASCII): user = await message.client.get_entity(args[0]) elif re.fullmatch(r"@\d{4,14}", args[0], flags=re.ASCII): user = args[0].replace("@", "") user = await message.client.get_entity(int(user)) elif re.fullmatch(r"\d{4,14}", args[0], flags=re.ASCII): user = await message.client.get_entity(int(args[0])) elif re.fullmatch(r"\D\w{3,32}", args[0], flags=re.ASCII): user = await message.client.get_entity(args[0]) if not user: return await message.reply("ты ввел хуйню реально") link = '{}'.format(user.username, user.first_name) if user.username else '{}'.format(user.id, user.first_name) return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) if not args: user = await message.client.get_entity(reply.sender_id) link = '{}'.format(user.username, user.first_name) if user.username else '{}'.format(user.id, user.first_name) return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) user = 0 if re.fullmatch(r"@\D\w{3,32}", args[0], flags=re.ASCII): user = await message.client.get_entity(args[0]) elif re.fullmatch(r"@\d{4,14}", args[0], flags=re.ASCII): user = args[0].replace("@", "") user = await message.client.get_entity(int(user)) elif re.fullmatch(r"\d{4,14}", args[0], flags=re.ASCII): user = await message.client.get_entity(int(args[0])) elif re.fullmatch(r"\D\w{3,32}", args[0], flags=re.ASCII): user = await message.client.get_entity(args[0]) if not user: return await message.reply("ты ввел хуйню реально") link = '{}'.format(user.username, user.first_name) if user.username else '{}'.format(user.id, user.first_name) return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) ### Module Num by trololo_1 async def зcmd(self, message): """ [arg] [arg] [arg].... В качестве аргументов используй числа или первые символы строки. (без них бьет по ответу с 10 патов) """ reply = await message.get_reply_message() exlist = self.db.get("NumMod", "exUsers") count_st = 0 count_hf = 0 if not reply or not reply and not args: await message.reply( self.strings("not_reply") ) return list_args = [] args = utils.get_args_raw(message) if not args: vlad = reply.sender_id hui = f'/заразить 10 @{vlad}\nспасибки ❤️' await message.client.send_message(message.peer_id, hui) return for i in args.split(' '): if '-' in i: ot_do = i.split('-') try: list_args.extend(str(x) for x in range(int(ot_do[0]), int(ot_do[1]) + 1)) except Exception: await message.reply( self.strings("wrong_ot-do") ) return else: list_args.append(i) a = reply.text lis = a.splitlines() for start in list_args: for x in lis: if x.lower().startswith(str(start.lower())): count_st = 1 if 'href="' in x: count_hf = 1 del_msg = 0 if not del_msg: await message.delete() del_msg += 1 b = x.find('href="') + 6 c = x.find('">') link = x[b:c] if link.startswith('tg'): users = '@' + link.split('=')[1] if users in exlist: await message.client.send_message(message.peer_id, self.strings("ex").format( users ), reply_to=reply ) else: await message.client.send_message(message.peer_id, f'/заразить 5 {users}\n', reply_to=reply) elif link.startswith('https://t.me'): a = '@' + str(link.split('/')[3]) if a in exlist: await message.client.send_message(message.peer_id, self.strings("ex").format( users ), reply_to=reply ) else: await message.client.send_message(message.peer_id, f'/заразить 5 {a}\n', reply_to=reply) else: await message.reply( self.strings("hueta") ) break await asyncio.sleep(3.3) if not count_st: await message.reply( self.strings("no_sargs") ) elif not count_hf: await message.reply( self.strings("no_link") ) elif len(list_args) >= 5: await message.reply( self.strings("tzar") ) async def оcmd(self, message): """ Заражает всех по реплаю. Используй ответ на сообщение с @id/@user/link """ reply = await message.get_reply_message() exlist = self.db.get("NumMod", "exUsers") err = "1" if not reply: await message.reply( self.strings("not_reply") ) return json = JSON.loads(reply.to_json()) try: for i in range(len(reply.entities)): try: link = json["entities"][i]["url"] if link.startswith('tg'): users = '@' + link.split('=')[1] if users in exlist: await message.reply( self.strings("ex").format( users ) ) else: await message.reply(f'/заразить {users}') elif link.startswith('https://t.me'): a = '@' + str(link.split("/")[3]) if a in exlist: await message.reply( self.strings("ex").format( a ) ) else: await message.reply(f'/заразить {a}') else: await message.reply( self.strings("hueta") ) except Exception: blayt = reply.raw_text[json["entities"][i]["offset"]:json["entities"][i]["offset"] + json["entities"][i]["length"]] if blayt in exlist: await message.reply( self.strings("ex").format( blayt ) ) else: await message.reply(f"/заразить {blayt}") await asyncio.sleep(3.3) except TypeError: err = "2" await message.edit( self.strings("hueta") ) if err != "2": await message.delete() async def искcmd(self, message): """ Добавляет исключения для команд .з и .о Используй: .иск {@user/@id/reply} """ reply = await message.get_reply_message() args = utils.get_args_raw(message) exlistGet = self.db.get("NumMod", "exUsers") exlist = exlistGet.copy() if not args: #if reply: # rid = "@" + str(reply.sender_id) if len(exlist) < 1: await message.reply( self.strings("empty_zar") ) return exsms = ''.join(f'{count}. {i}\n' for count, i in enumerate(exlist, start=1)) await utils.answer(message, exsms) return #if reply: if args == 'clear': exlist.clear() self.db.set("NumMod", "exUsers", exlist) await message.reply( self.strings("clrex") ) return if len(args.split(' ')) > 1 or args[0] != '@': await message.reply( self.strings("too_much_args") ) return if args in exlist: exlist.remove(args) self.db.set("NumMod", "exUsers", exlist) await message.edit( self.strings("exrm").format( args ) ) return exlist.append(args) self.db.set("NumMod", "exUsers", exlist) await message.edit( self.strings("exadd").format( args ) ) async def зарcmd(self, message): """ Список ваших заражений. .зар {@id} {чис.ло} {арг} Для удаления: .зар {@id} Аргументы: к -> добавить букву k(тысяч) к числу. ф/о -> поиск по ид'у/юзеру. р -> добавлению в список по реплаю. -backup -> бэкап зарлиста в файл. -restore -> добавление жертв из бэкапа в зарлист. -restore --y -> полная замена зарлиста на бэкап. """ pref = self.get_prefix() norm_args = utils.get_args(message) infList = self.db.get("NumMod", "infList") file_name = 'zarlistbackup.pickle' id = message.to_id reply = await message.get_reply_message() args = utils.get_args_raw(message) infList = self.db.get("NumMod", "infList") timezone = "Europe/Kiev" vremya = datetime.now(pytz.timezone(timezone)).strftime("%d.%m") k = '' with contextlib.suppress(Exception): args_list = args.split(' ') ### args_backup, args_restore, args_restore_y = [ "backup", "-backup", "-b", "--backup", "--b"],[ "restore", "-restore", "--restore", "-r", "--r"],[ "--y" ] if args in args_backup: try: await message.delete() dict_all = { 'zar': infList} with open(file_name, 'wb') as f: pickle.dump(dict_all, f) return await message.client.send_file(id, file_name) except Exception as e: return await utils.answer(message, f"Ошибка:\n{e}") try: if norm_args[0] in args_restore: backupargs1 = 0 try: if norm_args[1] in args_restore_y: backupargs1 = 1 except: pass reply_document = "" try: reply_document = reply.document except AttributeError: pass try: if not reply: return await message.reply( self.strings("not_reply") ) if not reply_document: return await utils.answer(message, f"ебалай, это не файл.") await reply.download_media(file_name) with open(file_name, 'rb') as f: data = pickle.load(f) zar = data['zar'] result_zar = dict(infList, **zar) if backupargs1: infList.clear() a = "с заменой " if backupargs1 else "" self.db.set("NumMod", "infList", result_zar) return await utils.answer(message, f" Бекап зарлиста {a}загружен!") except Exception as e: return await utils.answer(message, f"пиздец, Ошибка:\n{e}") except IndexError: pass if not args: if not infList: return await message.edit( self.strings("empty_zar") ) sms = "😷 Список ваших заражений:\n\n" sms += ''.join( f"• {key} +{value[0]} [{value[1]}]\n" for key, value in infList.items() ) return await utils.answer(message, sms) ## ### if 'р' in args.lower(): reply = await message.get_reply_message() if not reply: return await message.reply( self.strings("no_zar_reply") ) ## trueZ = 'подверг заражению' trueZ2 = 'подвергла заражению' # да, я еблан) text = reply.text if trueZ not in reply.text and trueZ2 not in reply.text: await message.reply( self.strings("wrong_zar_reply") ) else: # ☣ try: ept = "" text = reply.text x = text.index('☣') + 4 count = text[x:].split(' ', maxsplit=1)[0] x = text.index('user?id=') + 8 user = '@' + text[x:].split('"', maxsplit=1)[0] infList[user] = [str(count), vremya] self.db.set("NumMod", "infList", infList) await message.reply( self.strings("r.save").format( user, count, ept ) ) except ValueError: await message.reply( self.strings("nolink") ) elif args_list[0] == "clear84561": infList.clear() self.db.set("NumMod", "infList", infList) await message.reply( self.strings("clrzar") ) elif 'ф' in args.lower() or 'о' in args.lower(): zhertva = 0 reply = await message.get_reply_message() if not reply: zhertva = 0 if re.fullmatch(r"@\d{3,10}", args_list[0], flags=re.ASCII): zhertva = args_list[0] if re.fullmatch(r"@\D\w{3,32}", args_list[0], flags=re.ASCII): try: get_id = await message.client.get_entity(args_list[0]) get_id = get_id.id zhertva = "@" + str(get_id) except ValueError: return await message.reply( self.strings("no_user").format( args_list[0] ) ) if not zhertva: return await message.reply( self.strings("wrong_cmd") ) if zhertva in infList: user = infList[zhertva] await message.reply( self.strings("search").format( zhertva, user[0], user[1] ) ) if zhertva not in infList: await message.reply( self.strings("nf") ) if reply: # <- костыль для фикса UnboundLocalError: local variable 'reply' ... rid = '@' + str(reply.sender_id) zhertva = "R#C*N(" if re.fullmatch(r"@\d{3,10}", args_list[0], flags=re.ASCII): zhertva = args_list[0] if re.fullmatch(r"@\D\w{3,32}", args_list[0], flags=re.ASCII): try: get_id = await message.client.get_entity(args_list[0]) get_id = get_id.id zhertva = "@" + str(get_id) except: return await message.reply( self.strings("no_user").format( args_list ) ) if zhertva in infList: user = infList[zhertva] await message.reply( self.strings("search").format( zhertva, user[0], user[1] ) ) elif rid in infList: user = infList[rid] await message.reply( self.strings("search").format( rid, user[0], user[1] ) ) elif rid not in infList: await message.reply( self.strings("nf") ) elif len(args_list) == 1 and args_list[0] in infList: del_zar = f"(+{infList[args_list[0]][0]}) " infList.pop(args_list[0]) self.db.set("NumMod", "infList", infList) await message.reply( self.strings("zar_rm").format( args, del_zar ) ) else: k = '' pas = 0 try: user, count = str(args_list[0]), float(args_list[1]) except Exception: try: if "к" in args_list[1] or "k" in args_list[1]: user = str(args_list[0]) args = str(args_list[1]) len_args = len(args_list[1]) count = args[:len_args-1] count = float(count) k += 'k' pas = 1 else: return await message.reply( self.strings("wrong_cmd") ) except: return await message.reply( self.strings("wrong_cmd") ) if re.fullmatch(r"@\D{3,32}\w{3,32}", user, flags=re.ASCII): get_id = await message.client.get_entity(user) get_id = get_id.id user = "@" + str(get_id) if 'к' in args.lower() and pas == 0 or 'k' in args.lower() and pas == 0: k += "k" infList[user] = [str(count) + k, vremya] self.db.set("NumMod", "infList", infList) await message.reply( self.strings("r.save").format( user, count, k ) ) async def калкcmd(self, message: Message): """ Команда, которая вычисляет сколько 🧬Био-ресурсов или же ic☣️ нужно\nПример: .ic <характеристика> <уровень С> <уровень До>\n """ args = utils.get_args(message) if not args or len(args) != 3 or not args[1].isdigit() or not args[2].isdigit() or args[2] == args[1] or int(args[2]) <= int(args[1]): await utils.answer( message, "🚫| Чтобы использовать калькулятор напишите .ic <навык> <уровень С> <уровень До>" ) return skill, from_lvl, to_lvl = args from_lvl, to_lvl = int(from_lvl), int(to_lvl) amount = ( await self._client.inline_query( "@hikkaftgbot", f"{skill}#{from_lvl}#{to_lvl}" ) )[0].title if not amount.isdigit(): await utils.answer(message, amount) return amount = f"{int(amount):,}".replace(",", " ") await utils.answer( message, f"🍀| Чтобы увеличить навык «{skill}» с {from_lvl} до {to_lvl} уровня" f" потребуется: {amount} био-ресурсов🧬 или же ic☣️", ) async def довcmd(self, message): """ {args1} {args2 OR reply} Введи команду для просмотра аргументов. """ args = utils.get_args_raw(message) reply = await message.get_reply_message() filter_and_users = self.db.get("NumMod", "numfilter", {'users': [], 'filter': None, 'status': False}) wnik = await self._client(GetFullUserRequest(message.sender_id)) ent = wnik.users[0] a = self.config pref = self.get_prefix() dovs = "" if a["Доступ к лабе"]: dovs += "лабе, " if a["Доступ к заражениям"]: dovs += "заражениям, " if a["Доступ к прокачке"]: dovs += "прокачкам, " if a["Доступ к зарлисту"]: dovs += "зарлисту, " if a["Доступ к жертвам"]: dovs += "жертвам, " if a["Доступ к болезням"]: dovs += "болезням, " if a["Доступ к вирусам"]: dovs += "установке вирусов, " if a["Доступ к хиллингу"]: dovs += "хиллингу, " len_dovs = len(dovs) dovs_accept = dovs[:len_dovs-2] dov_users = ', '.join( f'@{i}' for i in filter_and_users['users'] ) if not args: return await self.inline.form( self.strings("dov").format( dov_users, filter_and_users['filter'] or '❌ Не установлен.', '✅ Запущен' if self.config["Вкл/выкл"] else '❎ Остановлен', ent.first_name if len(ent.first_name) <= 12 else "ник", dovs_accept if dovs_accept != "" else "всё ограничено 👌", pref ), reply_markup={ "text": "Закрыть", "callback": self.inline__close, }, message=message, disable_security=False ) args = args.split(' ', maxsplit=1) if len(args) == 1 and not reply and args[0] != 'пуск': # return await utils.answer(message, '🤔 Не могу понять, что за хуета?..') elif args[0] == 'сет': try: user_id = args[1] if not user_id.isdigit(): return await message.reply( self.strings("wrong_id") ) except Exception: user_id = str(reply.sender_id) if user_id in filter_and_users['users']: filter_and_users['users'].remove(user_id) return await message.reply( self.strings("user_rm").format( user_id ) ) elif user_id not in filter_and_users['users']: filter_and_users['users'].append(user_id) return await message.reply( self.strings("user_add").format( user_id ) ) return self.db.set("NumMod", "numfilter", filter_and_users) elif args[0] == 'ник': try: filter_and_users['filter'] = args[1].lower().strip() self.db.set("NumMod", "numfilter", filter_and_users) return await message.reply( self.strings("nick_add").format( args[1] ) ) except Exception: return await message.reply( self.strings("wrong_nick") ) elif args[0] == 'пуск': if self.config["Вкл/выкл"]: self.config["Вкл/выкл"] = False return await message.reply( self.strings("dov_stop") ) else: self.config["Вкл/выкл"] = True return await message.reply( self.strings("dov_start") ) else: return await message.reply( self.strings("dov.wrong_args") ) async def message_q( # спизжено из IrisLab self, text: str, user_id: int, mark_read: bool = False, delete: bool = False, ): """Отправляет сообщение и возращает ответ""" async with self.client.conversation(user_id, exclusive=False) as conv: msg = await conv.send_message(text) response = await conv.get_response() if mark_read: await conv.mark_read() if delete: await msg.delete() await response.delete() return response async def watcher(self, message): if not isinstance(message, telethon.tl.types.Message): return filter_and_users = self.db.get("NumMod", "numfilter", {'users': [], 'filter': None, 'status': False}) user_id = str(message.sender_id) sndr_id = message.sender_id nik = filter_and_users["filter"] text = message.raw_text.lower() reply = await message.get_reply_message() infList = self.db.get("NumMod", "infList") args = utils.get_args(message) ############################################################# Авто Зарлист get_me = await message.client.get_me() timezone = "Europe/Kiev" vremya = datetime.now(pytz.timezone(timezone)).strftime("%d.%m") if re.search(r"подве.{2,4} заражению", text, flags=re.ASCII): if not self.config["Автосохранение жертв"]: return split_text, r_text, msg_text = "", "", "" try: msg_text = message.text split_text = msg_text.splitlines() r_text = reply.text except: pass irises = [ 5443619563, 707693258, 5226378684, 5137994780, 5434504334 ] if message.sender_id not in irises: return attempts = "🗓 Отчёт об операции заражения объекта:" podverg = split_text[0] if attempts not in msg_text else split_text[3] retur = 0 try: if podverg.startswith('🦠 +{infList[user][0]} " if user in infList else "" infList[user] = [str(count), vremya] self.db.set("NumMod", "infList", infList) await message.reply(self.strings("auto.save").format(user, ept, count)) except ValueError: return #await message.reply( # self.strings("nolink") #) ############################################################ if re.fullmatch(r"ид\s@.{,32}", text, flags=re.ASCII): if str(sndr_id) != str(get_me.id): return user = 0 if re.fullmatch(r"@\D\w{3,32}", args[0], flags=re.ASCII): user = await message.client.get_entity(args[0]) elif re.fullmatch(r"@\d{4,14}", args[0], flags=re.ASCII): user = args[0].replace("@", "") user = await message.client.get_entity(int(user)) if not user: return await message.reply("ты ввел хуйню реально") link = '{}'.format(user.username, user.first_name) if user.username else '{}'.format(user.id, user.first_name) return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) if text == "ид": if str(sndr_id).lower() != str(get_me.id).lower(): return reply = await message.get_reply_message() args = utils.get_args(message) if not reply: user = await message.client.get_entity(message.sender_id) link = f'{user.first_name}' if user.username else f'{user.first_name}' return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) user = await message.client.get_entity(reply.sender_id) link = f'{user.first_name}' if user.username else f'{user.first_name}' return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) user = 0 if re.fullmatch(r"@\D\w{3,32}", args[0], flags=re.ASCII): user = await message.client.get_entity(args[0]) elif re.fullmatch(r"@\d{4,14}", args[0], flags=re.ASCII): user = args[0].replace("@", "") if not user: return await message.reply("ты ввел хуйню реально") link = '{}'.format(user.username, user.first_name) if user.username else '{}'.format(user.id, user.first_name) return await message.reply( f"✈️ {link}\n" f"👤 @{user.id}" ) if text == "жд": if str(sndr_id) != str(get_me.id): return if not reply: return await message.reply( self.strings("no_zar_reply") ) trueZ = 'подверг заражению' trueZ2 = 'подвергла заражению' # да, я еблан) text = reply.text if trueZ not in reply.text and trueZ2 not in reply.text: return await message.reply( self.strings("wrong_zar_reply") ) try: ept = "" text = reply.text x = text.index('☣') + 4 count = text[x:].split(' ', maxsplit=1)[0] x = text.index('user?id=') + 8 user = '@' + text[x:].split('"', maxsplit=1)[0] infList[user] = [str(count), vremya] self.db.set("NumMod", "infList", infList) await message.reply( self.strings("r.save").format( user, count, ept ) ) except ValueError: await message.reply( self.strings("nolink") ) if re.fullmatch(r"жд\s@\d{3,12}.{,10}", text, flags=re.ASCII): if str(sndr_id) != str(get_me.id): return k = '' pas = 0 try: user, count = str(args[0]), float(args[1]) except Exception: try: if "к" in args[1] or "k" in args[1] or "," in args: count = args[1].replace("k", "").replace("к", "").replace(",", ".") count = float(count) user = str(args[0]) k += 'k' pas = 1 else: return await message.reply( self.strings("wrong_cmd") ) except: return await message.reply( self.strings("wrong_cmd") ) if re.fullmatch(r"@\D{3,32}\w{3,32}", user, flags=re.ASCII): get_id = await message.client.get_entity(user) get_id = get_id.id user = "@" + str(get_id) if 'к' in args and pas == 0 or 'k' in args and pas == 0: k += "k" infList[user] = [str(count) + k, vremya] self.db.set("NumMod", "infList", infList) await message.reply( self.strings("r.save").format( user, count, k ) ) if text == "жу": if str(sndr_id) != str(get_me.id): return if not reply: return user = "@" + str(reply.sender_id) if user not in infList: return await message.reply( self.strings("nf") ) del_zar = f"(+{infList[user][0]}) " infList.pop(user) self.db.set("NumMod", "infList", infList) await message.reply( self.strings("zar_rm").format( args, del_zar ) ) if re.fullmatch(r"жу\s@\d{3,12}", text, flags=re.ASCII): if str(sndr_id) != str(get_me.id): return user = "@" + text.split("@", maxsplit=1)[1] if user not in infList: return await message.reply( self.strings("nf") ) del_zar = f"(+{infList[user][0]}) " infList.pop(user) self.db.set("NumMod", "infList", infList) await message.reply( self.strings("zar_rm").format( args, del_zar ) ) if text == "жл": if str(sndr_id) != str(get_me.id): return if not reply: return zhertva = "@" + str(reply.sender_id) if zhertva in infList: user = infList[zhertva] await message.reply( self.strings("search").format( zhertva, user[0], user[1] ) ) if zhertva not in infList: await message.reply( self.strings("nf") ) if re.fullmatch(r"жл\s@\d{3,12}", text, flags=re.ASCII): if str(sndr_id) != str(get_me.id): return zhertva = "@" + text.split("@", maxsplit=1)[1] if zhertva in infList: user = infList[zhertva] await message.reply( self.strings("search").format( zhertva, user[0], user[1] ) ) if zhertva not in infList: await message.reply( self.strings("nf") ) if not nik or not self.config["Вкл/выкл"] or user_id not in filter_and_users['users']: return if not text.startswith(nik): return if self.config["Доступ к заражениям"] == True: if send_mesа := re.search( r"(?Pбей\s|кус[ьайни]{,3}\s|зарази[тьть]{,3}\s|еб[ниажшь]{,3}\s|уеб[иаошть]{,3}\s|опуст[и]{,2}\s|организуй горячку\s)(?P[1-9]?[0]?\s)?(?P@[0-9a-z_]+|(?:https?://)?t\.me/[0-9a-z_]+|tg://openmessage\?user_id=(?P[0-9]+))", text, flags=re.ASCII ): send_mesа = send_mesа.groupdict() send_mesа['link'], send_mesа['id'] = '@' + send_mesа['id'] if send_mesа['id'] else send_mesа['link'], '' send_mesа['z'] = '/заразить ' send_mesа['lvl'] = send_mesа['lvl'] or '' mes = ''.join(send_mesа.values()) await message.reply(mes) if self.config["Доступ к заражениям"] == True: if send_mesа := re.search( r"(?Pбей\s|кус[ьайни]{,3}\s|зарази[тьть]{,3}\s|еб[ниажшь]{,3}\s|уеб[иаошть]{,3}\s|опуст[и]{,2}\s|организуй горячку\s)(?P[1-9]?[0]?\s)?([\=])", text, flags=re.ASCII ): send_mesа = send_mesа.groupdict() send_mesа['ravno'] = '=' send_mesа['z'] = '/заразить ' send_mesа['lvl'] = send_mesа['lvl'] or '' mes = ''.join(send_mesа.values()) await message.reply(mes) if self.config["Доступ к заражениям"] == True: if send_mesа := re.search( r"(?Pбей\s|кус[ьайни]{,3}\s|зарази[тьть]{,3}\s|еб[ниажшь]{,3}\s|уеб[иаошть]{,3}\s|опуст[и]{,2}\s|организуй горячку\s)(?P[1-9]?[0]?\s)?([\-])", text, flags=re.ASCII ): send_mesа = send_mesа.groupdict() send_mesа['minus'] = '-' send_mesа['z'] = '/заразить ' send_mesа['lvl'] = send_mesа['lvl'] or '' mes = ''.join(send_mesа.values()) await message.reply(mes) if self.config["Доступ к заражениям"] == True: if send_mesа := re.search( r"(?Pбей\s|кус[ьайни]{,3}\s|зарази[тьть]{,3}\s|еб[ниажшь]{,3}\s|уеб[иаошть]{,3}\s|опуст[и]{,2}\s|организуй горячку\s)(?P[1-9]?[0]?\s)?([\+])", text, flags=re.ASCII ): send_mesа = send_mesа.groupdict() send_mesа['plus'] = '+' send_mesа['z'] = '/заразить ' send_mesа['lvl'] = send_mesа['lvl'] or '' mes = ''.join(send_mesа.values()) await message.reply(mes) if self.config["Доступ к заражениям"] == True: if send_mesа := re.search( r"(?Pбей\s|кус[ьайни]{,3}\s|зарази[тьть]{,3}\s|еб[ниажшь]{,3}\s|уеб[иаошть]{,3}\s|опуст[и]{,2}\s|организуй горячку\s)(?P[1-9]?[0]?\s)?([/^равного])", text, flags=re.ASCII ): send_mesа = send_mesа.groupdict() send_mesа['ravno1'] = '=' send_mesа['z'] = '/заразить ' send_mesа['lvl'] = send_mesа['lvl'] or '' mes = ''.join(send_mesа.values()) await message.reply(mes) #if send_mesа := re.search( # r"(?Pбей\s|еб\s)(?P[1-9]?[0]?\s)", text): # if text == f"{nik} еб": # if reply: # popusk = reply.sender_id # send_mesа = send_mesа.groupdict() # send_mesа['z'] = '/зоразить ' # send_mesа['lvl'] = send_mesа['lvl'] or '' # send_mesа['id'] = popusk # mes = ''.join(send_mesа.values()) # await message.reply(mes) ###### чеки if self.config["Доступ к прокачке"] == True: if send_mes := re.search(r"(?Pзараз[куаность]{,5} чек[нутьиай]{,4}\s|чек[айниуть]{,4} зараз[куаность]{,5}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['ch'] = '+заразность ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pпат[огены]{,5} чек[айниуть]\s|чек[айниуть]{,4} пат[огены]{,5}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['pat'] = '+патоген ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pлетал[каьностьу]{,5} чек[айниуть]{,4}\s|чек[айниуть]{,4} летал[каьностьу]{,5}\s)(?P[1-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['let'] = '+летальность ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pквал[лаификацияу]{,8} чек[айниуть]{,4}\s|разраб[откау]{,4} чек[айниуть]{,4}\s|чек[айниуть]{,4} разраб[откау]{,4}\s|чек[айниуть]{,4} квал[улаификация]{,8}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['kvala'] = '+квалификация ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pчек[айниуть]{,4} иммун[еитеткау]{,4}\s|чек[айниуть]{,4} имун[еитеткау]{,4}\s|имун[еитеткау]{,4} чек[айниуть]{,4}\s|иммун[еитеткау]{,4} чек[айниуть]{,4}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['imun'] = '+иммунитет ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pсб чек[айниуть]{,4}\s|безопасно[сть]{,3} чек[айниуть]{,4}\s|служб[ау]{,2} чек[айниуть]{,4}\s|чек[айниуть]{,4} служб[ау]{,2}\s|чек[айниуть]{,4} безопасно[сть]{,3}\s|чек[айниуть]{,4} сб\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['sb'] = '+безопасность ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) #### кач алки elif send_mes := re.search(r"(?Pзараз[уканость]{,5}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['zar'] = '++заразность ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pпат[огены]{,5}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['pat'] = '++патоген ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pлетал[укаьность]{,5}\s)(?P[1-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['let'] = '++летальность ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pквал[улаификация]{,8}\s|разраб[откау]{,4}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['kvala'] = '++квалификация ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pиммун[уеитетка]{,4}|имун[уеитетка]{,4}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['imun'] = '++иммунитет ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) elif send_mes := re.search(r"(?Pсб\s|безопасно[сть]{,3}\s|служб[ау]{,2}\s)(?P[0-5]+)", text, flags=re.ASCII): send_mes = send_mes.groupdict() send_mes['sb'] = '++безопасность ' send_mes['lvl'] = send_mes['lvl'] or '' mes = ''.join(send_mes.values()) await message.reply(mes) if self.config["Доступ к болезням"] == True: if re.search(r"бол[езьни]{,5}\b", text, flags=re.ASCII): await message.reply('/мои болезни') if self.config["Доступ к жертвам"] == True: if re.search(r"жертв[ыау]{,2}|еж[ау]{,2}", text, flags=re.ASCII): await message.reply('/мои жертвы') if self.config["Доступ к вирусам"] == True: if re.search(r"-вирус[ыа]{,2}", text): await message.reply('-вирусы') if re.search(r"увед[ыаомления]{,8}", text, flags=re.ASCII): await message.reply('+вирусы') if self.config["Доступ к хиллингу"] == True: if re.search(r"вак[цинау]{,3}|леч[ись]{,2}|хи[лльсяйинг]{,2}|лек[арство]{,2}", text, flags=re.ASCII): await message.reply('/купить вакцину') if re.search(r"цен[ау]{,2}|вч[ек]{,2}", text): await message.reply('купить вакцину') toxt = text.replace(f"{nik} ", "") if self.config["Доступ к лабе"] == True: #if re.search(r"" + nik + "%лаб[уа]{,2}|/лаб[уа]{,2}|#лаб[уа]{,2}", text, flags=re.ASCII): # await message.reply('👇') # await message.respond('/моя лаба') if re.fullmatch(r"лаб[ау]{,2}", toxt, flags=re.ASCII): # регулярка lab_raw = await self.message_q( # отправляет сообщение боту и возвращает текст f"/лаб", 5443619563, mark_read=True, delete=True, ) lab_lines = lab_raw.text.splitlines() # те��ст с лабой, разбитый на строки if "🔬 Досье лаборатории" not in lab_lines[0]: return sms = "" for i in lab_lines: # цикл for по всем строкам в тексте лабы if "🧪 Готовых патогенов:" in i: s = i.replace("🧪 Готовых патогенов:", "") sms += f"🌊 Готовые паты: {s}\n" if "⏱ Новый патоген:" in i: s = i.replace("⏱ Новый патоген:", "") sms += f"🫧 Новый пат: {s}\n" if "👨‍🔬 Квалификация учёных:" in i: s = i.replace("👨‍🔬 Квалификация учёных:", "") s = s.replace("ур", "lvl") sms += f"\n🧳 Квала: {s}\n" if "🦠 Заразность:" in i: s = i.replace("🦠 Заразность:", "") s = s.replace("ур", "lvl") sms += f"🫂 Заразность: {s}\n" if "🛡 Иммунитет:" in i: s = i.replace("🛡 Иммунитет:", "") s = s.replace("ур", "lvl") sms += f"🛡 Иммунитет: {s}\n" if "☠️ Летальность:" in i: s = i.replace("☠️ Летальность:", "") s = s.replace("ур", "lvl") sms += f"💀 Летал: {s}\n" if "🕵️‍♂️ Служба безопасности:" in i: s = i.replace("🕵️‍♂️ Служба безопасности:", "") s = s.replace("ур", "lvl") sms += f"💥 Служба безопасности: {s}\n\n" if "☣️ Био-опыт:" in i: s = i.replace("☣️ Био-опыт:", "") sms += f"☣️ Опыт: {s}\n" if "🧬 Био-ресурс:" in i: s = i.replace("🧬 Био-ресурс:", "") sms += f"🧬 Ресурсы: {s}\n" await message.reply(sms) # ответ ####################################################### if self.config["Доступ к зарлисту"] == True: reply = await message.get_reply_message() infList = self.db.get("NumMod", "infList") timezone = "Europe/Kiev" vremya = datetime.now(pytz.timezone(timezone)).strftime("%d.%m") with contextlib.suppress(Exception): text_list = text.split(' ', maxsplit=2) if re.search(r"(?Pз\s)(?P@[0-9a-z_]+|tg://openmessage\?user_id=[0-9]+)", text, flags=re.ASCII): if not text.startswith(f"{nik} з") and not text.startswith(f"{nik}з"): return if text_list[2] in infList: user = infList[text_list[2]] await message.reply( self.strings("search").format( text_list[2], user[0], user[1] ) ) if text_list[2] not in infList: await message.reply( self.strings("nf") ) else: return if re.search(r"з", text, flags=re.ASCII): if text != f"{nik} з" and text != f"{nik}з": return zhertva = '@' + str(reply.sender_id) if not reply: return if re.fullmatch(r"@\d{5,11}", reply.text, flags=re.ASCII): zhertva = reply.text if re.fullmatch(r".{,5}заразить @\d{5,11}", reply.text.lower(), flags=re.ASCII): zhertva = "@" + str(reply.text.split("@")[1]) if re.fullmatch(r".{,5}заразить @\d{5,11}", reply.text.lower(), flags=re.ASCII): zhertva = "@" + str(reply.text.split("@")[1]) if re.fullmatch(r".{,5}зарази[ть\s..]+ @\D\w{3,32}", reply.text.lower(), flags=re.ASCII): user = "@" + str(reply.text.split("@")[1]) get_id = await message.client.get_entity(user) get_id = get_id.id zhertva = "@" + str(get_id) if re.fullmatch(r".{,5}зарази[ть\s..]+ @\D\w{3,32}", reply.text.lower(), flags=re.ASCII): user = "@" + str(reply.text.split("@")[1]) get_id = await message.client.get_entity(user) get_id = get_id.id zhertva = "@" + str(get_id) if zhertva in infList: user = infList[zhertva] await message.reply( self.strings("search").format( zhertva, user[0], user[1] ) ) elif zhertva not in infList: await message.reply( self.strings("nf") ) else: return if re.search(r"сб", text, flags=re.ASCII): if text != f"{nik} сб" and text != f"{nik}сб": return try: reply = await message.get_reply_message() txxxt = reply.text org = "Организатор" txxt = txxxt.splitlines() zhertva = "none" except: pass for i in txxt: if i.startswith(org): b = i.find('href="') + 6 c = i.find('">') link = i[b:c] if link.startswith("tg"): zhertva = '@' + link.split('=')[1] if link.startswith("https://t.me"): try: userk = str(link.split('/')[3]) uebok = "@" + str(userk) get_id = await message.client.get_entity(uebok) get_id1 = get_id.id zhertva = "@" + str(get_id1) except: return await message.reply("флудвейт, ищи по айди") if zhertva in infList: user = infList[zhertva] await message.reply( self.strings("search").format( zhertva, user[0], user[1] ) ) elif zhertva not in infList: await message.reply( self.strings("nf") ) if re.search(r"био", text, flags=re.ASCII): if text != f"{nik} био" and text != f"{nik}био": return reply = await message.get_reply_message() args = utils.get_args_raw(message) if not reply: return bt, bch, bk, btz, bchz, ezha, bol = "🔬 ТОП ЛАБОРАТОРИЙ ПО БИО-ОПЫТУ ЗАРАЖЁННЫХ:","🔬 ТОП ЛАБОРАТОРИЙ БЕСЕДЫ ПО БИО-ОПЫТУ ЗАРАЖЁННЫХ:","🔬 ТОП КОРПОРАЦИЙ ПО ЗАРАЖЕНИЯМ:","🔬 ТОП БОЛЕЗНЕЙ:","🔬 ТОП БОЛЕЗНЕЙ БЕСЕДЫ:","🦠 Список больных вашим патогеном:","🤒 Список ваших болезней:" infList = self.db.get("NumMod", "infList") a = reply.text sms = '' if "🔬 ТОП ЛАБОРАТОРИЙ БЕСЕДЫ" in a: sms += "🥰 топ вкусняшек чата:\n" if "🔬 ТОП ЛАБОРАТОРИЙ ПО" in a: sms += "🔬 ТOП ЛАБОРАТOРИЙ ПО БИO-ОПЫТУ ЗАРAЖЁННЫХ:\n" #ТOП ИММУНОДРОЧЕРОВ: if bt not in a and bch not in a and bk not in a and btz not in a and bchz not in a and ezha not in a and bol not in a: return b = reply.raw_text.splitlines() b.pop(0) hh = [] for i in b: try: hh.append(i.split('|')[1]) except: pass json = JSON.loads(reply.to_json()) count = 1 for i in range(0, len(reply.entities) ): try: exp = hh[i] except: exp = i link = json["entities"][i]["url"] try: if link.startswith('tg'): bla = [] for i in link.split('='): bla.append(i) b = await message.client.get_entity(int(bla[1])) b_first_name1 = utils.remove_html(utils.validate_html(utils.escape_html(b.first_name))) b_first_name2 = b_first_name1.replace("|", "/") b_final = "{1}".format(b.id, b_first_name2) zh = '' b_id = "@" + bla[1] if b_id in infList: user = infList[b_id] zh = f"(+{user[0]}) " sms += f'{str(count)}. {b_final} {zh}| {exp} | @{b.id}\n' elif link.startswith('https://t.me'): a = '@' + str(link.split('/')[3]) sms += f'{str(count)}. {a} | {result}\n' else: sms += f'{str(count)}. что за хуе��а?\n' except: if link.startswith('https://t.me'): a ='@' + str(link.split('/')[3]) sms += f'{str(count)}. {a} | {exp} \n' elif link.startswith('tg'): bla = [] for i in link.split('='): bla.append(i) blya = "???".format(bla[1]) zh = '' b_id = "@" + bla[1] if b_id in infList: user = infList[b_id] zh = f"(+{user[0]}) " sms += f'{str(count)}. {blya} {zh}| {exp} | @{bla[1]} \n' count += 1 try: await self.inline.form( sms, reply_markup={ "text": f"🔻 Close", "callback": self.inline__close, }, message=message, disable_security=False ) except: await message.reply(sms) ####################################################### ### async def гcmd(self, message): """ [arg] [arg] [arg].... Выполняет команду .ид по реплаю. Аргументом являются числа и первые символы строки. """ reply = await message.get_reply_message() count_st = 0 count_hf = 0 if not reply: await message.reply( self.strings("not_reply") ) return args = utils.get_args_raw(message) list_args=[] if not args: await message.reply( self.strings("not_args") ) return a = reply.text for i in args.split(' '): if '-' in i: ot_do = i.split('-') try: for x in range(int(ot_do[0]),int(ot_do[1])+1): list_args.append(str(x)) except: await message.reply( self.strings("ot_do") ) return else: list_args.append(i) lis = [] for i in a.splitlines(): lis.append(i) for start in list_args: for x in lis: if x.lower().startswith(str(start.lower())): count_st = 1 if 'href="' in x: count_hf = 1 b=x.find('href="')+6 c=x.find('">') link = x[b:c] if link.startswith('tg'): list = [] for i in link.split('='): list.append(i) await message.reply(f'.ид @{list[1]}' ) break elif link.startswith('https://t.me'): a ='@' + str(link.split('/')[3]) await message.reply(f'.ид {a}' ) break else: await message.reply( self.strings("hueta") ) break await asyncio.sleep(3) if not count_st: await message.reply( self.strings("no_sargs") ) elif not count_hf: await message.reply( self.strings("nolink") ) elif len(list_args) >= 5: await message.respond( self.strings("tids") ) await asyncio.sleep(3.3) async def иcmd(self, message): """ Чекает все айди по реплаю. Используй ответ на сообщение с @id/@user/link """ reply = await message.get_reply_message() if not reply: await message.reply( self.strings("not_reply") ) return json = JSON.loads(reply.to_json()) for i in range(len(reply.entities)): try: link = json["entities"][i]["url"] if link.startswith('tg'): users = '@' + link.split('=')[1] await message.reply(f'.ид {users}') elif link.startswith('https://t.me'): a = '@' + str(link.split("/")[3]) await message.reply(f'.ид {a}') else: await message.reply( self.strings("hueta") ) except Exception: hueta = validate_text(reply.raw_text) blayt = hueta[json["entities"][i]["offset"]:json["entities"][i]["offset"] + json["entities"][i]["length"]] await message.reply(f".ид {blayt}") await message.delete() await asyncio.sleep(3.3) async def бcmd(self, message): """ Используй ответом на биотопы/жертвы и т.п """ reply = await message.get_reply_message() args = utils.get_args_raw(message) infList = self.db.get("NumMod", "infList") a = reply.text b = reply.raw_text.splitlines() if not reply: await message.edit( self.strings("not_reply") ) return sms = '' if "🔬 ТОП ЛАБОРАТОРИЙ БЕСЕДЫ" in a: sms += "🥰 топ вкусняшек чата:\n" if "🔬 ТОП ЛАБОРАТОРИЙ ПО" in a: sms += "🔬 ТOП ЛАБОРАТOРИЙ ПО БИO-ОПЫТУ ЗАРAЖЁННЫХ:\n" #ТOП ИММУНОДРОЧЕРОВ: not_hueta = [ "🔬 ТОП ЛАБОРАТОРИЙ ПО БИО-ОПЫТУ ЗАРАЖЁННЫХ:", "🔬 ТОП ЛАБОРАТОРИЙ БЕСЕДЫ ПО БИО-ОПЫТУ ЗАРАЖЁННЫХ:", "🔬 ТОП КОРПОРАЦИЙ ПО ЗАРАЖЕНИЯМ:", "🔬 ТОП БОЛЕЗНЕЙ:", "🔬 ТОП БОЛЕЗНЕЙ БЕСЕДЫ:", "🦠 Список больных вашим патогеном:", "🤒 Список ваших болезней:" ] if b[0] not in not_hueta: await message.respond( self.strings("hueta") ) return get_me = await message.client.get_me() emojis = [ "🍎", "🚛", "", "", "🔠", "🟪", "🔝", "🤔" ] emoji = f"{random.choices(emojis, k=1)[0]} " if get_me.premium else "" hiunya = [ f"{emoji}щас ебанёт)... {utils.ascii_face()}", f"{emoji}взлом пентагона... {utils.ascii_face()}", f"{emoji}доза героина поступает в кровь... {utils.ascii_face()}" ] msg = f"{emoji}Loading... {utils.ascii_face()}" if random.randint(1, 100) > 95: msg = random.choices(hiunya, k=1)[0] await utils.answer(message, msg) b.pop(0) hh = [] for i in b: try: hh.append(i.split('|')[1]) except: pass json = JSON.loads(reply.to_json()) count = 1 for i in range(0, len(reply.entities) ): exp = "" try: exp = hh[i] except: exp = i link = json["entities"][i]["url"] if link.startswith('tg'): bla = [] for i in link.split('='): bla.append(i) b_id = "@" + bla[1] zh = f"(✔{infList[b_id][0]}) " if b_id in infList else "" try: b = await message.client.get_entity(int(bla[1])) name = utils.remove_html(utils.validate_html(b.first_name)) name = f"{name}" sms += f'{str(count)}. {name} {zh}| {exp} | @{b.id}\n' except: blya = "???".format(bla[1]) sms += f'{str(count)}. {blya} {zh}| {exp} | @{bla[1]}\n' elif link.startswith('https://t.me'): a = '@' + str(link.split('/')[3]) try: sms += f'{str(count)}. {a} | {result}\n' except: sms += f'{str(count)}. {a} | {exp}\n' else: sms += f'{str(count)}. что за хуета?\n' count += 1 await self.inline.form( sms, reply_markup={ "text": f"🔻 Close", "callback": self.inline__close, }, message=message, disable_security=False ) ### помощь async def biohelpcmd(self, message: Message): """ Выдает помощь по модулю """ pref = self.get_prefix() args = utils.get_args_raw(message) reply = await message.get_reply_message() args = args.lower() ####################### if args == 'дов': nnik = self.db.get("NumMod", "numfilter", {'users': [], 'filter': None, 'status': False}) nik = nnik['filter'] or 'ник' await self.inline.form( self.strings("guidedov").format( nik, pref ), reply_markup={ "text": "Закрыть", "callback": self.inline__close, }, message=message, disable_security=False ) elif args == "зарлист": nnik = self.db.get("NumMod", "numfilter", {'users': [], 'filter': None, 'status': False}) nik = nnik['filter'] or 'ник' await self.inline.form( self.strings("zarlistHelp").format( pref, nik ), reply_markup={ "text": "Закрыть", "callback": self.inline__close, }, message=message, disable_security=False ) else: await self.inline.form( self.strings("guide").format( pref ), reply_markup={ "text": "Закрыть", "callback": self.inline__close, }, message=message, disable_security=False ) async def inline__close(self, call) -> None: await call.delete() def __init__(self): self.config = loader.ModuleConfig( loader.ConfigValue( "Доступ к лабе", False, "Доступ к лабе через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к заражениям", True, "Доступ к команде заражения через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к прокачке", False, "Доступ к прокачке навыков через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к зарлисту", False, "Доступ к поиску жертв в зарлисте через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к жертвам", True, "Доступ к жертвам через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к болезням", True, "Доступ к болезням через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к вирусам", False, "Доступ к установке вирусов через доверку", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Доступ к хиллингу", True, "Доступ к покупке вакцины", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Вкл/выкл", False, "Включение и отключение доверки" "\n❗️ Не влияет на отключение доверки в других Num'модулях.", validator=loader.validators.Boolean(), ), loader.ConfigValue( "Автосохранение жертв", True, "Вкл/выкл автосохранение жертв в зарлист. \n\nОБЯЗАТЕЛЬНО НУЖЕН ЮЗЕРНЕЙМ ПО ТИПУ @idiotcoders", validator=loader.validators.Boolean(), ), loader.ConfigValue( "inline bot for б", False, "[BETA] Использование инлайн бота для команды б", validator=loader.validators.Boolean(), ) )