Added and updated repositories 2025-07-11 08:27:20

This commit is contained in:
github-actions[bot]
2025-07-11 08:27:20 +00:00
parent 35e8befc45
commit e328cd957a
320 changed files with 37419 additions and 33510 deletions

View File

@@ -1,89 +1,89 @@
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.5.3
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/AnecdoteGenerator.jpg
# meta developer: @shitmodules
import logging
import random
import aiohttp
from hikkatl.types import Message # type: ignore
from .. import loader, utils # type: ignore
chat = "anertsy"
logger = logging.getLogger(__name__)
@loader.tds
class AnecdoteGeneratorMod(loader.Module):
"""Anecdote generator by @shitmodules"""
strings = {
"name": "AnecdoteGenerator",
"loading": "<emoji document_id=5451732530048802485>⏳</emoji> Loading...",
"error": "<emoji document_id=5197593315075169671>😢</emoji> Something went wrong, try again",
}
strings_ru = {
"loading": "<emoji document_id=5451732530048802485>⏳</emoji> Загрузка...",
"error": "<emoji document_id=5197593315075169671>😢</emoji> Что-то пошло не так, попробуй снова",
}
async def client_ready(self, client, db):
self._db = db
self._client = client
self.messages = await self.client.get_messages(chat, limit=None)
@loader.command(ru_doc="Генерирует анекдоты (они не всегда смешные)")
async def anec(self, message: Message):
"""Sends an anecdote (not always funny)"""
wtf = random.choice(self.messages)
await utils.answer(message, wtf)
@loader.command()
async def joke(self, message: Message):
"""Sends an anecdote x2 (not always funny)"""
try:
await utils.answer(message, self.strings["loading"])
url = "https://v2.jokeapi.dev/joke/Any"
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
response.raise_for_status()
data = await response.json()
if data:
joke = data.get("joke")
answer_text = joke if joke else self.strings["error"]
else:
answer_text = self.strings["error"]
await utils.answer(message, answer_text)
except aiohttp.ClientError as e:
await utils.answer(message, f"<i>{e}</i>")
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.5.3
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/AnecdoteGenerator.jpg
# meta developer: @shitmodules
import logging
import random
import aiohttp
from hikkatl.types import Message # type: ignore
from .. import loader, utils # type: ignore
chat = "anertsy"
logger = logging.getLogger(__name__)
@loader.tds
class AnecdoteGeneratorMod(loader.Module):
"""Anecdote generator by @shitmodules"""
strings = {
"name": "AnecdoteGenerator",
"loading": "<emoji document_id=5451732530048802485>⏳</emoji> Loading...",
"error": "<emoji document_id=5197593315075169671>😢</emoji> Something went wrong, try again",
}
strings_ru = {
"loading": "<emoji document_id=5451732530048802485>⏳</emoji> Загрузка...",
"error": "<emoji document_id=5197593315075169671>😢</emoji> Что-то пошло не так, попробуй снова",
}
async def client_ready(self, client, db):
self._db = db
self._client = client
self.messages = await self.client.get_messages(chat, limit=None)
@loader.command(ru_doc="Генерирует анекдоты (они не всегда смешные)")
async def anec(self, message: Message):
"""Sends an anecdote (not always funny)"""
wtf = random.choice(self.messages)
await utils.answer(message, wtf)
@loader.command()
async def joke(self, message: Message):
"""Sends an anecdote x2 (not always funny)"""
try:
await utils.answer(message, self.strings["loading"])
url = "https://v2.jokeapi.dev/joke/Any"
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
response.raise_for_status()
data = await response.json()
if data:
joke = data.get("joke")
answer_text = joke if joke else self.strings["error"]
else:
answer_text = self.strings["error"]
await utils.answer(message, answer_text)
except aiohttp.ClientError as e:
await utils.answer(message, f"<i>{e}</i>")

View File

@@ -1,74 +1,74 @@
__version__ = (0, 0, 1)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/Facts.jpeg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/Facts.jpg
# meta developer: @shitmodules
import random
from asyncio import sleep
from hikkatl.types import Message # type: ignore
from .. import loader, utils # type: ignore
channel = "interesnie_fac"
@loader.tds
class Facts(loader.Module):
"""interesting facts by @shitmodules"""
strings = {
"name": "Facts",
"wait": (
"<emoji document_id=5472146462362048818>💡</emoji>"
"<b>Looking for something interesting for you...</b>"
),
}
strings_ru = {
"wait": (
"<emoji document_id=5472146462362048818>💡</emoji>"
"<b>Ищу для тебя что-то интересное...</b>"
),
}
async def client_ready(self, client, db):
self._db = db
self._client = client
self.messages = await self.client.get_messages(channel, limit=None)
@loader.command(ru_doc="> Поищу для тебя какую нибудь интересную информацию)")
async def ifacts(self, message: Message):
"""
> I'll look for some interesting information for you)
"""
wtf = random.choice(self.messages)
msg = await utils.answer(message, self.strings["wait"])
await sleep(0.4)
await msg.delete()
await utils.answer(message, wtf)
__version__ = (0, 0, 1)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/Facts.jpeg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/Facts.jpg
# meta developer: @shitmodules
import random
from asyncio import sleep
from hikkatl.types import Message # type: ignore
from .. import loader, utils # type: ignore
channel = "interesnie_fac"
@loader.tds
class Facts(loader.Module):
"""interesting facts by @shitmodules"""
strings = {
"name": "Facts",
"wait": (
"<emoji document_id=5472146462362048818>💡</emoji>"
"<b>Looking for something interesting for you...</b>"
),
}
strings_ru = {
"wait": (
"<emoji document_id=5472146462362048818>💡</emoji>"
"<b>Ищу для тебя что-то интересное...</b>"
),
}
async def client_ready(self, client, db):
self._db = db
self._client = client
self.messages = await self.client.get_messages(channel, limit=None)
@loader.command(ru_doc="> Поищу для тебя какую нибудь интересную информацию)")
async def ifacts(self, message: Message):
"""
> I'll look for some interesting information for you)
"""
wtf = random.choice(self.messages)
msg = await utils.answer(message, self.strings["wait"])
await sleep(0.4)
await msg.delete()
await utils.answer(message, wtf)

View File

@@ -1,160 +1,160 @@
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/FarmPA.jpg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/FarmPA.jpeg
# meta developer: @shitmodules
import asyncio
import logging
from hikkatl.types import Message # type: ignore
from .. import loader, utils # type: ignore
logging = logging.getLogger(__name__)
@loader.tds
class FarmPAMod(loader.Module):
"""
Module for automatic farming sm in Pipisa bot | PA -> PipisaBot by shitmodules.t.me
"""
strings = {
"name": "FarmPA",
"group_id": "Group ID",
"enable": "<b>FarmPA successfully launched</b>",
"disable": "<b>FarmPA successfully stopped</b>",
"loading": "<b>Loading...</b>",
"id_error": "<b>No group id for farming. Use: </b><code>.config FarmPA</code> <b>to enter group id.</b>",
}
strings_ru = {
"group_id": "Айди группы",
"enable": "<b>FarmPA успешно запущен</b>",
"disable": "<b>FarmPA успешно остановлен</b>",
"loading": "<b>Загрузка...</b>",
"id_error": "<b>Не указан айди группы для фарма. Используй: </b><code>.config FarmPA</code> <b>для ввода ийди группы.</b>",
}
strings_uz = {
"group_id": "Guruh ID-si",
"enable": "<b>FarmPA muvaffaqiyatli ishga tushirildi</b>",
"disable": "<b>FarmPA muvaffaqiyatli to'xtatildi</b>",
"loading": "<b>Yuklanmoqda...</b>",
"id_error": "<b>Dehqonchilik uchun guruh identifikatori yo'q. Guruh identifikatorini kiritish uchun </b><code>.config FarmPA</code> <b>dan foydalaning.</b>",
}
strings_de = {
"group_id": "Gruppen-ID",
"enable": "<b>FarmPA erfolgreich gestartet</b>",
"disable": "<b>FarmPA erfolgreich deaktiviert</b>",
"loading": "<b>Laden...</b>",
"id_error": "<b>Es gibt keine Gruppen-ID für die Landwirtschaft. Verwenden Sie </b><code>.config FarmPA</code> <b>, um eine Gruppen-ID einzugeben.</b>",
}
strings_es = {
"group_id": "Identificación del grupo",
"enable": "<b>FarmPA se inició correctamente</b>",
"disable": "<b>FarmPA deshabilitado con éxito</b>",
"loading": "<b>Cargando...</b>",
"id_error": "<b>No hay ID de grupo para la agricultura. Usa </b><code>.config FarmPA</code> <b> para ingresar una ID de grupo.</b>",
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"group_id",
None,
lambda: self.strings["group_id"],
),
)
async def client_ready(self, client, db):
self._db = db
self._client = client
@loader.command(
ru_doc="Включить/отключить режим автоматического фарма для бота Pipisa.",
uz_doc="Pipisa boti uchun avtomatik dehqonchilik rejimini yoqadi/ochiradi.",
de_doc="Aktiviert/deaktiviert den Auto-Farming-Modus für den Pipisa-Bot.",
es_doc="Habilita/deshabilita el modo de cultivo automático para el bot Pipisa.",
)
async def dfarm(self, message: Message):
"""
Turns on/off automatic farming mode for the Pipisa bot.
"""
try:
status = self.db.get("farm_status", "status")
group_id = self.config["group_id"]
if not group_id:
await utils.answer(message, self.strings["id_error"])
return
if status:
self.db.set("farm_status", "status", False)
await utils.answer(message, self.strings["disable"])
else:
self.db.set("farm_status", "status", True)
await utils.answer(message, self.strings["enable"])
while self.db.get("farm_status", "status"):
await message.client.send_message(int(group_id), "/dick")
await asyncio.sleep(84600)
except Exception as e:
await utils.answer(message, f"Something went wrong..\nError: {e}\n\nIf the error persists, please report this error in the support chat: https://t.me/shitmodules_chat")
logging.info("An error has occurred")
@loader.command(
ru_doc="Команда .chatid показывает идентификатор чата.",
uz_doc=".chatid buyrug'i suhbat identifikatorini ko'rsatadi.",
de_doc="Der Befehl .chatid zeigt die Chat-ID an.",
es_doc="El comando .chatid muestra la identificación del chat.",
)
async def chatidcmd(self, message):
"""The .chatid command shows the chat ID."""
if message.is_private:
await message.edit("<b>This is not a chat!</b>")
return
args = utils.get_args_raw(message)
to_chat = None
try:
if args:
to_chat = int(args) if args.isdigit() else args
else:
to_chat = message.chat_id
except ValueError:
to_chat = message.chat_id
chat = await message.client.get_entity(to_chat)
await message.edit(
f"<b>ID</b>: <code>{chat.id}</code>"
)
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/FarmPA.jpg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/FarmPA.jpeg
# meta developer: @shitmodules
import asyncio
import logging
from hikkatl.types import Message # type: ignore
from .. import loader, utils # type: ignore
logging = logging.getLogger(__name__)
@loader.tds
class FarmPAMod(loader.Module):
"""
Module for automatic farming sm in Pipisa bot | PA -> PipisaBot by shitmodules.t.me
"""
strings = {
"name": "FarmPA",
"group_id": "Group ID",
"enable": "<b>FarmPA successfully launched</b>",
"disable": "<b>FarmPA successfully stopped</b>",
"loading": "<b>Loading...</b>",
"id_error": "<b>No group id for farming. Use: </b><code>.config FarmPA</code> <b>to enter group id.</b>",
}
strings_ru = {
"group_id": "Айди группы",
"enable": "<b>FarmPA успешно запущен</b>",
"disable": "<b>FarmPA успешно остановлен</b>",
"loading": "<b>Загрузка...</b>",
"id_error": "<b>Не указан айди группы для фарма. Используй: </b><code>.config FarmPA</code> <b>для ввода ийди группы.</b>",
}
strings_uz = {
"group_id": "Guruh ID-si",
"enable": "<b>FarmPA muvaffaqiyatli ishga tushirildi</b>",
"disable": "<b>FarmPA muvaffaqiyatli to'xtatildi</b>",
"loading": "<b>Yuklanmoqda...</b>",
"id_error": "<b>Dehqonchilik uchun guruh identifikatori yo'q. Guruh identifikatorini kiritish uchun </b><code>.config FarmPA</code> <b>dan foydalaning.</b>",
}
strings_de = {
"group_id": "Gruppen-ID",
"enable": "<b>FarmPA erfolgreich gestartet</b>",
"disable": "<b>FarmPA erfolgreich deaktiviert</b>",
"loading": "<b>Laden...</b>",
"id_error": "<b>Es gibt keine Gruppen-ID für die Landwirtschaft. Verwenden Sie </b><code>.config FarmPA</code> <b>, um eine Gruppen-ID einzugeben.</b>",
}
strings_es = {
"group_id": "Identificación del grupo",
"enable": "<b>FarmPA se inició correctamente</b>",
"disable": "<b>FarmPA deshabilitado con éxito</b>",
"loading": "<b>Cargando...</b>",
"id_error": "<b>No hay ID de grupo para la agricultura. Usa </b><code>.config FarmPA</code> <b> para ingresar una ID de grupo.</b>",
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"group_id",
None,
lambda: self.strings["group_id"],
),
)
async def client_ready(self, client, db):
self._db = db
self._client = client
@loader.command(
ru_doc="Включить/отключить режим автоматического фарма для бота Pipisa.",
uz_doc="Pipisa boti uchun avtomatik dehqonchilik rejimini yoqadi/ochiradi.",
de_doc="Aktiviert/deaktiviert den Auto-Farming-Modus für den Pipisa-Bot.",
es_doc="Habilita/deshabilita el modo de cultivo automático para el bot Pipisa.",
)
async def dfarm(self, message: Message):
"""
Turns on/off automatic farming mode for the Pipisa bot.
"""
try:
status = self.db.get("farm_status", "status")
group_id = self.config["group_id"]
if not group_id:
await utils.answer(message, self.strings["id_error"])
return
if status:
self.db.set("farm_status", "status", False)
await utils.answer(message, self.strings["disable"])
else:
self.db.set("farm_status", "status", True)
await utils.answer(message, self.strings["enable"])
while self.db.get("farm_status", "status"):
await message.client.send_message(int(group_id), "/dick")
await asyncio.sleep(84600)
except Exception as e:
await utils.answer(message, f"Something went wrong..\nError: {e}\n\nIf the error persists, please report this error in the support chat: https://t.me/shitmodules_chat")
logging.info("An error has occurred")
@loader.command(
ru_doc="Команда .chatid показывает идентификатор чата.",
uz_doc=".chatid buyrug'i suhbat identifikatorini ko'rsatadi.",
de_doc="Der Befehl .chatid zeigt die Chat-ID an.",
es_doc="El comando .chatid muestra la identificación del chat.",
)
async def chatidcmd(self, message):
"""The .chatid command shows the chat ID."""
if message.is_private:
await message.edit("<b>This is not a chat!</b>")
return
args = utils.get_args_raw(message)
to_chat = None
try:
if args:
to_chat = int(args) if args.isdigit() else args
else:
to_chat = message.chat_id
except ValueError:
to_chat = message.chat_id
chat = await message.client.get_entity(to_chat)
await message.edit(
f"<b>ID</b>: <code>{chat.id}</code>"
)

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +1,79 @@
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/Hw_age_ur.png
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/Hw_age_ur.jpg
# meta developer: @shitmodules
import datetime
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
@loader.tds
class Hw_age_ur(loader.Module):
"""
Using this module, you can find out the age of a person on the date of his birth.
"""
strings = {
"name": "How old are you?",
"no_date": (
"<emoji document_id=5447644880824181073>⚠️</emoji>"
"<b>Enter your date of birth as shown in the example.</b>"
),
"result": (
"<emoji document_id=5447410659077661506>🌐</emoji>"
"<b>You (he, she) are <u>{}</u> years old.</b>"
),
}
strings_ru = {
"no_date": (
"<emoji document_id=5447644880824181073>⚠️</emoji>"
"<b>Введи дату рождения как указано в примере.</b>"
),
"result": (
"<emoji document_id=5447410659077661506>🌐</emoji>"
"<b>Тебе (ему, ей) <u>{}</u> лет.</b>"
),
}
@loader.command(ru_doc="> .yo 01.05.1996 | => (число, месяц, год)")
async def yo(self, message: Message):
"""> .yo 01.05.1996 | => date, month, year"""
args = utils.get_args_raw(message)
try:
birth_date = datetime.datetime.strptime(args, "%d.%m.%Y").date()
except ValueError:
await utils.answer(message, self.strings["no_date"])
return
today_date = datetime.date.today()
age_years = today_date.year - birth_date.year - ((today_date.month, today_date.day) < (birth_date.month, birth_date.day))
await utils.answer(message, self.strings["result"].format(age_years))
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/Hw_age_ur.png
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/Hw_age_ur.jpg
# meta developer: @shitmodules
import datetime
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
@loader.tds
class Hw_age_ur(loader.Module):
"""
Using this module, you can find out the age of a person on the date of his birth.
"""
strings = {
"name": "How old are you?",
"no_date": (
"<emoji document_id=5447644880824181073>⚠️</emoji>"
"<b>Enter your date of birth as shown in the example.</b>"
),
"result": (
"<emoji document_id=5447410659077661506>🌐</emoji>"
"<b>You (he, she) are <u>{}</u> years old.</b>"
),
}
strings_ru = {
"no_date": (
"<emoji document_id=5447644880824181073>⚠️</emoji>"
"<b>Введи дату рождения как указано в примере.</b>"
),
"result": (
"<emoji document_id=5447410659077661506>🌐</emoji>"
"<b>Тебе (ему, ей) <u>{}</u> лет.</b>"
),
}
@loader.command(ru_doc="> .yo 01.05.1996 | => (число, месяц, год)")
async def yo(self, message: Message):
"""> .yo 01.05.1996 | => date, month, year"""
args = utils.get_args_raw(message)
try:
birth_date = datetime.datetime.strptime(args, "%d.%m.%Y").date()
except ValueError:
await utils.answer(message, self.strings["no_date"])
return
today_date = datetime.date.today()
age_years = today_date.year - birth_date.year - ((today_date.month, today_date.day) < (birth_date.month, birth_date.day))
await utils.answer(message, self.strings["result"].format(age_years))

View File

@@ -1,97 +1,97 @@
__version__ = (1, 0, 3)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/Imgbb.jpg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/Imgbb.jpeg
# meta developer: @shitmodules
import io
import logging
import requests
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
logger = logging.getLogger(__name__)
@loader.tds
class Imgbb(loader.Module):
"""Upload media to imgbb.com"""
strings = {
"name": "Imgbb",
"_cfg_doc_api": "API key for imgbb",
"no_api_key": "<b><u>API key</u> is not specified, it can be obtained on the website imgbb.com/api and then enter it into the module config:</b> <code>{}config Imgbb</code>",
"no_reply": "<b>The file reply was not found.</b>",
"error": "<b>Failed to upload</b> Try again.",
"result": "🪄 <b>Your file uploaded</b> - <code>{}</code>",
}
strings_ru = {
"_cfg_doc_api": "API-ключ для imgbb",
"no_api_key": "<b><u>Ключ API</u> не найден, его можно получить на сайте imgbb.com/api и затем ввести в конфиг модуля:</b> <code>{}config Imgbb</code>",
"no_reply": "<b>Не найден реплай на файл.</b>",
"error": "<b>Не удалось загрузить</b> Попробуй ещё раз.",
"result": "🪄 <b>Твой файл загружен</b> - <code>{}</code>",
}
def __init__(self):
self.name = self.strings["name"]
self.config = loader.ModuleConfig(
loader.ConfigValue(
"api_key",
None,
doc=lambda: self.strings["_cfg_doc_api"],
validator=loader.validators.Hidden(loader.validators.String()),
),
)
async def client_ready(self, client, db):
self._db = db
self._client = client
@loader.command(ru_doc=".imgbb <файл> - загрузить файл на imgbb.com")
async def imgbb(self, message: Message):
""".imgbb - upload file to imgbb.com"""
try:
api_key = self.config["api_key"]
if not api_key:
return await utils.answer(message, self.strings["no_api_key"].format(self.get_prefix()))
reply = await message.get_reply_message()
if not reply or not reply.file:
return await utils.answer(message, self.strings["no_reply"])
file = io.BytesIO(await reply.download_media(bytes))
data = (await utils.run_sync(requests.post, "https://api.imgbb.com/1/upload", data={"key": self.config["api_key"]}, files={"image": file})).json()
if data:
await utils.answer(message, self.strings["result"].format(data["data"].get("url_viewer", "")))
else:
await utils.answer(message, self.stringa["error"])
except Exception:
await utils.answer(message, self.strings["error"])
__version__ = (1, 0, 3)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/Imgbb.jpg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/Imgbb.jpeg
# meta developer: @shitmodules
import io
import logging
import requests
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
logger = logging.getLogger(__name__)
@loader.tds
class Imgbb(loader.Module):
"""Upload media to imgbb.com"""
strings = {
"name": "Imgbb",
"_cfg_doc_api": "API key for imgbb",
"no_api_key": "<b><u>API key</u> is not specified, it can be obtained on the website imgbb.com/api and then enter it into the module config:</b> <code>{}config Imgbb</code>",
"no_reply": "<b>The file reply was not found.</b>",
"error": "<b>Failed to upload</b> Try again.",
"result": "🪄 <b>Your file uploaded</b> - <code>{}</code>",
}
strings_ru = {
"_cfg_doc_api": "API-ключ для imgbb",
"no_api_key": "<b><u>Ключ API</u> не найден, его можно получить на сайте imgbb.com/api и затем ввести в конфиг модуля:</b> <code>{}config Imgbb</code>",
"no_reply": "<b>Не найден реплай на файл.</b>",
"error": "<b>Не удалось загрузить</b> Попробуй ещё раз.",
"result": "🪄 <b>Твой файл загружен</b> - <code>{}</code>",
}
def __init__(self):
self.name = self.strings["name"]
self.config = loader.ModuleConfig(
loader.ConfigValue(
"api_key",
None,
doc=lambda: self.strings["_cfg_doc_api"],
validator=loader.validators.Hidden(loader.validators.String()),
),
)
async def client_ready(self, client, db):
self._db = db
self._client = client
@loader.command(ru_doc=".imgbb <файл> - загрузить файл на imgbb.com")
async def imgbb(self, message: Message):
""".imgbb - upload file to imgbb.com"""
try:
api_key = self.config["api_key"]
if not api_key:
return await utils.answer(message, self.strings["no_api_key"].format(self.get_prefix()))
reply = await message.get_reply_message()
if not reply or not reply.file:
return await utils.answer(message, self.strings["no_reply"])
file = io.BytesIO(await reply.download_media(bytes))
data = (await utils.run_sync(requests.post, "https://api.imgbb.com/1/upload", data={"key": self.config["api_key"]}, files={"image": file})).json()
if data:
await utils.answer(message, self.strings["result"].format(data["data"].get("url_viewer", "")))
else:
await utils.answer(message, self.stringa["error"])
except Exception:
await utils.answer(message, self.strings["error"])

View File

@@ -1,76 +1,76 @@
__version__ = (1, 0, 6)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/IndividualLinks.jpg
# meta banner: https://te.legra.ph/file/b15eed35d5ec0dd3a4716.jpg
# meta developer: @shitmodules
import logging
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
logger = logging.getLogger(__name__)
@loader.tds
class IndividualLinks(loader.Module):
"""> Links to individual content in telegram."""
strings = {
"name": "IndividualLinks",
"loading": "<emoji document_id=5292226786229236118>🔄</emoji> <b>Loading...</b>",
"links": (
"<emoji document_id=5273942560694347620>🥰</emoji>Press `F`"
"https://t.me/+pbJv2A-WQD0yNGMy\n"
"https://t.me/kdn4h\n"
"https://t.me/+70GsDVKwnN1mMmJi\n"
"https://t.me/antivanil\n"
"https://t.me/+FMONDOvtkTUwMGNi\n"
"https://t.me/netvoyotelo\n"
"https://t.me/Fckk_the_rules\n"
"https://t.me/porn_in_a_minute\n"
"https://t.me/+Uay7cXVOXFtHRmLj\n"
"https://t.me/TheOfficeBruh\n"
"https://t.me/ne_tvoya_suka\n"
"https://t.me/+vAqM7BVWT-VlY2Qy\n"
"https://t.me/+YzDq9RwWlCc1N2Ey\n"
"https://t.me/+RfdHbMqqeUdiNDUy\n"
"https://t.me/+EjMIiaCIDzZlMzA6\n"
"https://t.me/+DRZurxHB_EVkMjZi\n"
"https://t.me/+fKnl-36ghaI2MjRl\n"
"http://t.me/+kdnO91tZ8u0wODJi\n"
),
}
async def client_ready(self, client, db):
self._db = db
self._client = client
@loader.command()
async def indlinks(self, message: Message):
"""Just send .indlinks"""
await utils.answer(message, self.strings["links"])
__version__ = (1, 0, 6)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/IndividualLinks.jpg
# meta banner: https://te.legra.ph/file/b15eed35d5ec0dd3a4716.jpg
# meta developer: @shitmodules
import logging
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
logger = logging.getLogger(__name__)
@loader.tds
class IndividualLinks(loader.Module):
"""> Links to individual content in telegram."""
strings = {
"name": "IndividualLinks",
"loading": "<emoji document_id=5292226786229236118>🔄</emoji> <b>Loading...</b>",
"links": (
"<emoji document_id=5273942560694347620>🥰</emoji>Press `F`"
"https://t.me/+pbJv2A-WQD0yNGMy\n"
"https://t.me/kdn4h\n"
"https://t.me/+70GsDVKwnN1mMmJi\n"
"https://t.me/antivanil\n"
"https://t.me/+FMONDOvtkTUwMGNi\n"
"https://t.me/netvoyotelo\n"
"https://t.me/Fckk_the_rules\n"
"https://t.me/porn_in_a_minute\n"
"https://t.me/+Uay7cXVOXFtHRmLj\n"
"https://t.me/TheOfficeBruh\n"
"https://t.me/ne_tvoya_suka\n"
"https://t.me/+vAqM7BVWT-VlY2Qy\n"
"https://t.me/+YzDq9RwWlCc1N2Ey\n"
"https://t.me/+RfdHbMqqeUdiNDUy\n"
"https://t.me/+EjMIiaCIDzZlMzA6\n"
"https://t.me/+DRZurxHB_EVkMjZi\n"
"https://t.me/+fKnl-36ghaI2MjRl\n"
"http://t.me/+kdnO91tZ8u0wODJi\n"
),
}
async def client_ready(self, client, db):
self._db = db
self._client = client
@loader.command()
async def indlinks(self, message: Message):
"""Just send .indlinks"""
await utils.answer(message, self.strings["links"])

View File

@@ -1,66 +1,66 @@
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.3
# meta pic: https://x0.at/TPOM.png
# meta banner:
# meta developer: @shitmodules
import logging
import requests
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
logger = logging.getLogger(__name__)
@loader.tds
class QuoteGen(loader.Module):
"""Generation quote"""
strings = {
"name": "QuoteGen",
"loading": "<emoji document_id=5289930378885214069>✍️</emoji><b>Search for a quote...</b>",
"result": "<b><blockquote>{}</blockquote>\n\n<emoji document_id=5247213725080890199>©️</emoji><i>{}</i></b>",
"err": "<b>An error occurred, please try later</b>",
}
def __init__(self):
self.name = self.strings["name"]
async def client_ready(self, client, db):
self._client = client
self._db = db
@loader.command()
async def qn(self, message: Message):
"""Usage: .qn"""
await utils.answer(message, self.strings["loading"])
data = (await utils.run_sync(requests.get, "https://api.quotable.io/random")).json()
if data:
await utils.answer(message, self.strings["result"].format(data.get("content"), data.get("author")))
else:
await utils.answer(message, self.strings["err"])
__version__ = (1, 0, 2)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.3
# meta pic: https://x0.at/TPOM.png
# meta banner:
# meta developer: @shitmodules
import logging
import requests
from .. import loader, utils # type: ignore
from hikkatl.types import Message # type: ignore
logger = logging.getLogger(__name__)
@loader.tds
class QuoteGen(loader.Module):
"""Generation quote"""
strings = {
"name": "QuoteGen",
"loading": "<emoji document_id=5289930378885214069>✍️</emoji><b>Search for a quote...</b>",
"result": "<b><blockquote>{}</blockquote>\n\n<emoji document_id=5247213725080890199>©️</emoji><i>{}</i></b>",
"err": "<b>An error occurred, please try later</b>",
}
def __init__(self):
self.name = self.strings["name"]
async def client_ready(self, client, db):
self._client = client
self._db = db
@loader.command()
async def qn(self, message: Message):
"""Usage: .qn"""
await utils.answer(message, self.strings["loading"])
data = (await utils.run_sync(requests.get, "https://api.quotable.io/random")).json()
if data:
await utils.answer(message, self.strings["result"].format(data.get("content"), data.get("author")))
else:
await utils.answer(message, self.strings["err"])

View File

@@ -1,138 +1,138 @@
__version__ = (0, 0, 1)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/RandomChats.jpg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/RandomChats.jpg
# meta developer: @shitmodules
from telethon import events, functions
from telethon.tl.types import Message
from asyncio.exceptions import TimeoutError
from telethon.errors.rpcerrorlist import YouBlockedUserError
from .. import loader, utils
@loader.tds
class RandomChatsMod(loader.Module):
"""The module throws off a random chat"""
strings = {
"name": "RandomChats",
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Uploading a chat...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Unlock this bot: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>The waiting time has expired.</b> "
"<b>Either the bot is loaded, or it's dead. Try again a little later</b>"
),
}
strings_ru = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Загрузка чата...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Разблокируй этого бота: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Истекло время ожидания.</b> "
"<b>Либо бот нагружен, либо он умер. Попробуйте немного позже.</b>"
),
}
strings_uz = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Chat yuklanmoqda...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Ushbu botni qora ro'yxatdan chiqaring: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji>Kutish vaqti tugadi.</b> "
"<b>Yoki bot Yuklangan yoki u vafot etgan. Birozdan keyin sinab ko'ring."
),
}
strings_kk = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Чатты жүктеу...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Бұл боттың құлпын ашыңыз: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Күту уақыты аяқталды.</b>"
"<b>Не бот жүктелген, не ол қайтыс болды. Сәл кейінірек көріңіз.</b>"
),
}
strings_tr = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Sohbet yükleniyor...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b> </b>"
"<b>Bu botun engellemesini kaldırın: @iris_moon_bot</b>"
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>zaman aşımı süresi doldu.</b>"
"<b>Ya bot yüklendi ya da öldü. Lütfen daha sonra tekrar deneyiniz.</b>"
),
}
@loader.command(
ru_doc="> Кидает рандомную ссылку на чат",
uz_doc="> Tasodifiy chat havolasini tashlaydi",
kk_doc="> Кездейсоқ чат сілтемесін лақтырады",
tr_doc="> Sohbete rastgele bir bağlantı atar",
)
async def rchatcmd(self, message: Message):
"""> Throws a random link to the chat"""
msg = await utils.answer(message, self.strings("processing"))
chat = "@iris_moon_bot"
async with message.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(
incoming=True, from_users=chat))
await message.client.send_message(chat, "🔀 Случайная беседа")
response = await response
except YouBlockedUserError:
await message.edit(self.strings("un-iris"))
return
except TimeoutError:
await utils.answer(message, self.strings("time-err"))
return
if response.text:
await msg.edit(f"<emoji document_id=5190568934717270805>🙂</emoji><b>{response.text}<b>")
await message.client(
functions.messages.DeleteHistoryRequest(
peer="@iris_moon_bot", max_id=0, just_clear=False, revoke=True,
),
)
__version__ = (0, 0, 1)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/RandomChats.jpg
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/RandomChats.jpg
# meta developer: @shitmodules
from telethon import events, functions
from telethon.tl.types import Message
from asyncio.exceptions import TimeoutError
from telethon.errors.rpcerrorlist import YouBlockedUserError
from .. import loader, utils
@loader.tds
class RandomChatsMod(loader.Module):
"""The module throws off a random chat"""
strings = {
"name": "RandomChats",
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Uploading a chat...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Unlock this bot: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>The waiting time has expired.</b> "
"<b>Either the bot is loaded, or it's dead. Try again a little later</b>"
),
}
strings_ru = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Загрузка чата...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Разблокируй этого бота: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Истекло время ожидания.</b> "
"<b>Либо бот нагружен, либо он умер. Попробуйте немного позже.</b>"
),
}
strings_uz = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Chat yuklanmoqda...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Ushbu botni qora ro'yxatdan chiqaring: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji>Kutish vaqti tugadi.</b> "
"<b>Yoki bot Yuklangan yoki u vafot etgan. Birozdan keyin sinab ko'ring."
),
}
strings_kk = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Чатты жүктеу...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji>"
"<b>Бұл боттың құлпын ашыңыз: @iris_moon_bot</b>",
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Күту уақыты аяқталды.</b>"
"<b>Не бот жүктелген, не ол қайтыс болды. Сәл кейінірек көріңіз.</b>"
),
}
strings_tr = {
"processing": "<emoji document_id=5190568934717270805>🙂</emoji><b>Sohbet yükleniyor...</b>",
"un-iris": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b> </b>"
"<b>Bu botun engellemesini kaldırın: @iris_moon_bot</b>"
),
"time-err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>zaman aşımı süresi doldu.</b>"
"<b>Ya bot yüklendi ya da öldü. Lütfen daha sonra tekrar deneyiniz.</b>"
),
}
@loader.command(
ru_doc="> Кидает рандомную ссылку на чат",
uz_doc="> Tasodifiy chat havolasini tashlaydi",
kk_doc="> Кездейсоқ чат сілтемесін лақтырады",
tr_doc="> Sohbete rastgele bir bağlantı atar",
)
async def rchatcmd(self, message: Message):
"""> Throws a random link to the chat"""
msg = await utils.answer(message, self.strings("processing"))
chat = "@iris_moon_bot"
async with message.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(
incoming=True, from_users=chat))
await message.client.send_message(chat, "🔀 Случайная беседа")
response = await response
except YouBlockedUserError:
await message.edit(self.strings("un-iris"))
return
except TimeoutError:
await utils.answer(message, self.strings("time-err"))
return
if response.text:
await msg.edit(f"<emoji document_id=5190568934717270805>🙂</emoji><b>{response.text}<b>")
await message.client(
functions.messages.DeleteHistoryRequest(
peer="@iris_moon_bot", max_id=0, just_clear=False, revoke=True,
),
)

View File

@@ -1,151 +1,151 @@
__version__ = (0, 0, 3)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/SpellChecking.png
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/SpellChecking.jpg
# meta developer: @shitmodules
import logging
from telethon.tl.types import Message
from asyncio.exceptions import TimeoutError
from telethon.errors.rpcerrorlist import YouBlockedUserError
from .. import loader, utils
logger = logging.getLogger(__name__)
@loader.tds
class SpellCheckingMod(loader.Module):
"""Check text for spelling errors by @shitmodules"""
strings = {
"name": "SpellChecking",
"processing": (
"<emoji document_id=5787344001862471785>✍️</emoji><b>Loading...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551>👎</emoji><b>There are no arguments or they are not enough!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>Unlock @SpellCheckBot"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>The waiting time has expired.</b> "
"<b>Either the bot is loaded, or it's dead. Try again a little later</b>"
),
}
strings_ru = {
"processing": (
"<emoji document_id=5787344001862471785>✍️</emoji><b>Загрузка...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551>👎</emoji><b>Нету аргументов или их недостаточно!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>Разблокируй @SpellCheckBot"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Истекло время ожидания.</b> "
"<b>Либо бот нагружен, либо он умер. Попробуйте немного позже.</b>"
),
}
strings_uz = {
"processing": (
"<emoji document_id=5787344001862471785>✍️</emoji><b>yuklanmoqda...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551>👎</emoji><b>argumentlar yo'q yoki ular etarli emas!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>@SpellCheckBot botini blokdan chiqarish"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji>Kutish vaqti tugadi.</b> "
"<b>Yoki bot Yuklangan yoki u vafot etgan. Birozdan keyin sinab ko'ring."
),
}
strings_kk = {
"processing": (
"<emoji document_id=5787344001862471785>></emoji><b > жүктеу...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551 >👎</emoji><b>дәлелдер жоқ немесе жеткіліксіз!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>@SpellCheckBot ботының бұғатын алу"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Күту уақыты аяқталды.</b> "
"<b>Не бот жүктелген, не ол қайтыс болды. Сәл кейінірек көріңіз.</b>"
),
}
@loader.command(
ru_doc="> Проверяет текст на орфографические ошибки.",
kk_doc="> Мәтінді емле қателеріне тексереді.",
uz_doc="> Matnni imlo xatolarini tekshiradi.",
)
async def orfgcmd(self, message: Message):
"""> Suggestion for checking spelling errors"""
chat = "@SpellCheckBot"
args = utils.get_args_raw(message)
if len(args) < 2:
await utils.answer(message, self.strings("no_args"))
return
msg = await utils.answer(message, self.strings("processing"))
async with self._client.conversation(chat) as conv:
try:
bot = []
bot += [await conv.send_message(args)]
bot += [await conv.get_response()]
response = await conv.get_response()
except YouBlockedUserError:
await utils.answer(message, self.strings("unl_bot"))
return
except TimeoutError:
await utils.answer(message, self.strings("time_err"))
return
if response.text:
await self._client.send_message(
message.to_id,
response.text,
reply_to=message.reply_to_msg_id,
)
await msg.delete()
await self.client.delete_dialog(chat)
__version__ = (0, 0, 3)
# *
# * $$\ $$\ $$\ $$\ $$\
# * $$ | \__| $$ | $$ | $$ |
# * $$$$$$$\ $$$$$$$\ $$\ $$$$$$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$ |$$\ $$\ $$ | $$$$$$\ $$$$$$$\
# * $$ _____|$$ __$$\ $$ |\_$$ _| $$ _$$ _$$\ $$ __$$\ $$ __$$ |$$ | $$ |$$ |$$ __$$\ $$ _____|
# * \$$$$$$\ $$ | $$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ |$$ / $$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
# * \____$$\ $$ | $$ |$$ | $$ |$$\ $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ ____| \____$$\
# * $$$$$$$ |$$ | $$ |$$ | \$$$$ |$$ | $$ | $$ |\$$$$$$ |\$$$$$$$ |\$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
# * \_______/ \__| \__|\__| \____/ \__| \__| \__| \______/ \_______| \______/ \__| \_______|\_______/
# *
# *
# * © Copyright 2023
# *
# * https://t.me/shitmodules
# *
# 🔒 Code is licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://creativecommons.org/licenses/by-nc-nd/4.0/
# You CANNOT edit this file without direct permission from the author.
# You can redistribute this file without any changes.
# scope: hikka_only
# scope: hikka_min 1.6.2
# meta pic: https://raw.githubusercontent.com/kamolgks/assets/main/SpellChecking.png
# meta banner: https://raw.githubusercontent.com/kamolgks/assets/main/SpellChecking.jpg
# meta developer: @shitmodules
import logging
from telethon.tl.types import Message
from asyncio.exceptions import TimeoutError
from telethon.errors.rpcerrorlist import YouBlockedUserError
from .. import loader, utils
logger = logging.getLogger(__name__)
@loader.tds
class SpellCheckingMod(loader.Module):
"""Check text for spelling errors by @shitmodules"""
strings = {
"name": "SpellChecking",
"processing": (
"<emoji document_id=5787344001862471785>✍️</emoji><b>Loading...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551>👎</emoji><b>There are no arguments or they are not enough!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>Unlock @SpellCheckBot"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>The waiting time has expired.</b> "
"<b>Either the bot is loaded, or it's dead. Try again a little later</b>"
),
}
strings_ru = {
"processing": (
"<emoji document_id=5787344001862471785>✍️</emoji><b>Загрузка...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551>👎</emoji><b>Нету аргументов или их недостаточно!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>Разблокируй @SpellCheckBot"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Истекло время ожидания.</b> "
"<b>Либо бот нагружен, либо он умер. Попробуйте немного позже.</b>"
),
}
strings_uz = {
"processing": (
"<emoji document_id=5787344001862471785>✍️</emoji><b>yuklanmoqda...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551>👎</emoji><b>argumentlar yo'q yoki ular etarli emas!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>@SpellCheckBot botini blokdan chiqarish"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji>Kutish vaqti tugadi.</b> "
"<b>Yoki bot Yuklangan yoki u vafot etgan. Birozdan keyin sinab ko'ring."
),
}
strings_kk = {
"processing": (
"<emoji document_id=5787344001862471785>></emoji><b > жүктеу...</b>"
),
"no_args": (
"<emoji document_id=5215552806722738551 >👎</emoji><b>дәлелдер жоқ немесе жеткіліксіз!</b>"
),
"unl_bot": (
"<emoji document_id=5215557810359639942>⚠️</emoji>@SpellCheckBot ботының бұғатын алу"
),
"time_err": (
"<emoji document_id=5280821895711697516>⛔️</emoji><b>Күту уақыты аяқталды.</b> "
"<b>Не бот жүктелген, не ол қайтыс болды. Сәл кейінірек көріңіз.</b>"
),
}
@loader.command(
ru_doc="> Проверяет текст на орфографические ошибки.",
kk_doc="> Мәтінді емле қателеріне тексереді.",
uz_doc="> Matnni imlo xatolarini tekshiradi.",
)
async def orfgcmd(self, message: Message):
"""> Suggestion for checking spelling errors"""
chat = "@SpellCheckBot"
args = utils.get_args_raw(message)
if len(args) < 2:
await utils.answer(message, self.strings("no_args"))
return
msg = await utils.answer(message, self.strings("processing"))
async with self._client.conversation(chat) as conv:
try:
bot = []
bot += [await conv.send_message(args)]
bot += [await conv.get_response()]
response = await conv.get_response()
except YouBlockedUserError:
await utils.answer(message, self.strings("unl_bot"))
return
except TimeoutError:
await utils.answer(message, self.strings("time_err"))
return
if response.text:
await self._client.send_message(
message.to_id,
response.text,
reply_to=message.reply_to_msg_id,
)
await msg.delete()
await self.client.delete_dialog(chat)