Merge pull request #133 from MuRuLOSE/update-submodules_fa25e8168de619bee6b2aa808204e4e35e221b2c

Update of repositories 2025-12-21 01:16:08
This commit is contained in:
Zahar Vanilovv
2025-12-21 19:11:46 +03:00
committed by GitHub
36 changed files with 275 additions and 4075 deletions

View File

@@ -1,31 +0,0 @@
# meta developer: @modwini
from .. import loader
import requests
import io
from PIL import Image
@loader.tds
class CatModule(loader.Module):
"""Отправляет случайное фото котика."""
strings = {"name": "Cat"}
async def client_ready(self, client, db):
self.client = client
@loader.owner
async def catcmd(self, message):
"""Отправляет случайное фото котика."""
url = "https://api.thecatapi.com/v1/images/search"
response = requests.get(url)
if response.status_code == 200:
img_url = response.json()[0]['url']
response = requests.get(img_url)
img = Image.open(io.BytesIO(response.content))
if img.mode == 'P':
img = img.convert('RGB')
output = io.BytesIO()
img.save(output, format='JPEG')
output.seek(0)
await self.client.send_file(message.to_id, output, reply_to=message)

View File

@@ -1,42 +0,0 @@
import time
import random
import logging
from .. import loader, utils
from random import randint, choice
from asyncio import sleep
logger = logging.getLogger(__name__)
def register(cb):
cb(fake_ping())
class fake_ping(loader.Module):
"""Подпишись на канал @modwini"""
strings = {'name': 'fake ping v4'}
async def pinjcmd(self, message):
"""Используй .pinj <цифры>."""
text = utils.get_args_raw(message)
if not text:
for pinj in ["<code>🐻 Nofin...</code>"]:
await message.edit(pinj)
await sleep(0.3)
named_tuple = time.localtime()
time_string = time.strftime("%H:%M:%S", named_tuple)
await message.edit(f"<b>⏱ Скорость отклика Telegram:</b>\n<code>{random.randint(10, 1999)}.{random.randint(10, 99)}</code> <b>ms</b>\n<b>😎 Прошло с последней перезагрузки: {time_string}</b>")
return
else:
for pinj in ["<code>🐻 Nofin...</code>"]:
await message.edit(pinj)
await sleep(0.3)
named_tuple = time.localtime()
time_string = time.strftime("%H:%M:%S", named_tuple)
pinj = (f"<b>⏱ Скорость отклика Telegram:</b>\n<code>{text}</code> <b>ms</b>\n<b>😎 Прошло с последней перезагрузки: {time_string}</b>")
await message.edit(pinj)

View File

@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,49 +0,0 @@
# meta developer: @modwini
import datetime
from telethon import events, utils
from telethon.tl import types
from .. import loader, utils
@loader.tds
class MessageStatsMod(loader.Module):
"""Показывает статистику сообщений в текущем чате"""
strings = {"name": "MessageStats"}
def __init__(self):
self.name = self.strings["name"]
self._client = None
self.today = datetime.datetime.now().date()
self.week_ago = self.today - datetime.timedelta(days=7)
self.month_ago = self.today.replace(day=1)
self.all_time = None
async def client_ready(self, client, db):
self._client = client
me = await self._client.get_me()
async for dialog in self._client.iter_dialogs():
if dialog.entity.id == me.id:
self.all_time = (await self._client.get_messages(dialog, limit=1))[0].date.date()
break
async def statscmd(self, message: types.Message):
"""Показать статистику сообщений"""
await utils.answer(message, f"<b>👺🔪Считаю сообщения...</b>")
day_count = week_count = month_count = all_count = 0
async for msg in self._client.iter_messages(message.to_id):
if msg.date.date() == self.today:
day_count += 1
if self.week_ago <= msg.date.date() <= self.today:
week_count += 1
if self.month_ago <= msg.date.date() <= self.today:
month_count += 1
if msg.date.date() >= self.all_time:
all_count += 1
day_text = f"<b>За день:</b> <code>{day_count}</code>"
week_text = f"<b>За неделю:</b> <code>{week_count}</code>"
month_text = f"<b>За месяц:</b> <code>{month_count}</code>"
all_text = f"<b>За все время:</b> <code>{all_count}</code>"
await utils.answer(message, f"<b>👾Вот ваша статистика активности в этом чате:</b>\n{day_text}\n{week_text}\n{month_text}\n{all_text}")

View File

@@ -1,67 +0,0 @@
# meta developer: @modwini
import random
from datetime import timedelta
import asyncio
import time
from telethon import events
from telethon import functions
from telethon.tl.types import Message
from .. import loader, utils
@loader.tds
class FarmMonacoMod(loader.Module):
"""Модуль для автоматического фарминга в игровом боте @MonacoGamebot"""
strings = {"name": "MonacoFarm"}
def __init__(self):
self.tasks = []
async def b_run(self, client):
while True:
await client.send_message('@monacogamebot', "Ежедневный бонус")
await asyncio.sleep(1200)
async def p_run(self, client):
while True:
await client.send_message('@monacogamebot', "Бизнес снять")
await asyncio.sleep(1920)
async def l_run(self, client):
while True:
await client.send_message('@monacogamebot', "Город снять")
await asyncio.sleep(1220)
async def t_run(self, client):
while True:
await client.send_message('@monacogamebot', "Работать")
await asyncio.sleep(1440)
async def a_run(self, client):
while True:
await client.send_message('@monacogamebot', "Ферма снять")
await asyncio.sleep(1680)
@loader.unrestricted
@loader.ratelimit
async def farmcmd(self, message):
"""Запустить автоматический фарминг в боте"""
if self.tasks:
return await message.edit("Автоматический фарминг уже запущен.")
await message.edit("Автоматический фарминг запущен.")
client = message.client
self.tasks = [asyncio.create_task(self.b_run(client)), asyncio.create_task(self.p_run(client)), asyncio.create_task(self.l_run(client)), asyncio.create_task(self.t_run(client)), asyncio.create_task(self.a_run(client))]
@loader.unrestricted
@loader.ratelimit
async def stopcmd(self, message):
"""Остановить автоматический фарминг в боте"""
if not self.tasks:
return await message.edit("Автоматический фарминг не запущен.")
for task in self.tasks:
task.cancel()
self.tasks = []
await message.edit("Автоматический фарминг остановлен.")

View File

@@ -1,43 +0,0 @@
import time
import random
import logging
from .. import loader, utils
from random import randint, choice
from asyncio import sleep
from telethon.tl.functions.channels import JoinChannelRequest
logger = logging.getLogger(__name__)
def register(cb):
cb(NewFakePing())
class NewFakePing(loader.Module):
"""Фейк пинг с премиум эмодзи"""
strings = {'name': 'NewFakePing'}
async def pinjcmd(self, message):
"""Используй .pinj <цифры>."""
text = utils.get_args_raw(message)
if not text:
for pinj in ["🌔"]:
await message.edit(pinj)
await sleep(0.3)
named_tuple = time.localtime()
time_string = time.strftime("%H:%M:%S", named_tuple)
await message.edit(f"<emoji document_id=5431449001532594346>⚡️</emoji> <b>Скорость отклика Telegram:</b> <code>{random.randint(10, 1999)}.{random.randint(10, 99)}</code> <b>ms</b>\n<emoji document_id=5445284980978621387>🚀</emoji> <b>Прошло с последней перезагрузки: {time_string}</b>")
return
else:
for pinj in ["🌔"]:
await message.edit(pinj)
await sleep(0.3)
named_tuple = time.localtime()
time_string = time.strftime("%H:%M:%S", named_tuple)
pinj = (f"<emoji document_id=5431449001532594346>⚡️</emoji> <b>Скорость отклика Telegram:</b> <code>{text}</code> <b>ms</b>\n<emoji document_id=5445284980978621387>🚀</emoji> <b>Прошло с последней перезагрузки: {time_string}</b>")
await message.edit(pinj)

View File

@@ -1,43 +0,0 @@
import time
import random
import logging
from .. import loader, utils
from random import randint, choice
from asyncio import sleep
from telethon.tl.functions.channels import JoinChannelRequest
logger = logging.getLogger(__name__)
def register(cb):
cb(Premiumfake_ping())
class Premiumfake_ping(loader.Module):
"""Фейк пинг с премиум эмодзи"""
strings = {'name': 'Premium fake ping'}
async def pinjcmd(self, message):
"""Используй .pinj <цифры>."""
text = utils.get_args_raw(message)
if not text:
for pinj in ["<code>🐻 Nofin...</code>"]:
await message.edit(pinj)
await sleep(0.3)
named_tuple = time.localtime()
time_string = time.strftime("%H:%M:%S", named_tuple)
await message.edit(f"<emoji document_id=6321050180095313397>⏱</emoji> <b>Скорость отклика Telegram:</b> <code>{random.randint(10, 1999)}.{random.randint(10, 99)}</code> <b>ms</b>\n<emoji document_id=5377371691078916778>😎</emoji> <b>Прошло с последней перезагрузки: {time_string}</b>")
return
else:
for pinj in ["<code>🐻 Nofin...</code>"]:
await message.edit(pinj)
await sleep(0.3)
named_tuple = time.localtime()
time_string = time.strftime("%H:%M:%S", named_tuple)
pinj = (f"<emoji document_id=6321050180095313397>⏱</emoji> <b>Скорость отклика Telegram:</b> <code>{text}</code> <b>ms</b>\n<emoji document_id=5377371691078916778>😎</emoji> <b>Прошло с последней перезагрузки: {time_string}</b>")
await message.edit(pinj)

View File

@@ -1,19 +0,0 @@
import random
from .. import loader
from telethon.tl.types import Message
@loader.tds
class amogus(loader.Module):
"""Подпишись на канал @modwini"""
strings = {"name": "amogus"}
async def amoguscmd(self, message: Message):
"""Скидывает видео с амогусом (работает в чатах где отключено медиa)"""
if message.out:
await message.delete()
await message.respond(
f'<a href="https://t.me/radiofmonline/{random.randint(233, 236)}">­</a>',
)

View File

@@ -1,48 +0,0 @@
from .. import loader, utils
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
import time
def register(cb):
cb(checker())
class checker(loader.Module):
"""Подпишись на канал @modwini"""
strings = {'name': 'BfgB'}
async def bcmd(self, message):
"""Показывает сколько у вас денег в @bforgame_bot"""
chat = "@bforgame_bot"
text = "б"
reply = await message.get_reply_message()
if not text and not reply:
await message.edit("<b>Нет текста или реплая!</b>")
return
await message.edit("<b>💫Подпишись на канал @modwini</b>")
async with message.client.conversation(chat) as conv:
if text:
try:
response = conv.wait_event(events.NewMessage(incoming=True, from_users=1721358063))
await message.client.send_message(chat, text)
response = await response
except YouBlockedUserError:
await message.edit("<b>Разблокируй @bforgame_bot!</b>")
return
else:
try:
user = await utils.get_user(reply)
response = conv.wait_event(events.NewMessage(incoming=True, from_users=1721358063))
await message.client.send_message(chat, f"{reply.raw_text} (с) {user.first_name}")
response = await response
except YouBlockedUserError:
await message.edit("<b>Разблокируй @bforgame_bot!</b>")
return
if response.text:
await message.client.send_message(message.to_id, f"<b> {response.text} </b> ")
#await message.client.send_message(message.to_id, f"<b>💫Подпишись на канал @modwini</b> ")
await message.delete()
if response.media:
await message.client.send_file(message.to_id, response.media, reply_to=reply.id if reply else None)
await message.delete()

View File

@@ -1,22 +0,0 @@
# канал @modwini
from .. import loader
@loader.tds
class billy(loader.Module):
"""Подпишись на канал @modwini"""
strings = {"name": "Billy"}
async def billycmd(self, message):
"""Отправляет видео сообщение"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://telesco.pe/kruglishik/31",
voice_note=True,
reply_to=reply.id if reply else None,
)
return

View File

@@ -1,19 +0,0 @@
import random
from .. import loader
from telethon.tl.types import Message
@loader.tds
class catt(loader.Module):
"""Подпишись на канал @modwini"""
strings = {"name": "catt"}
async def cattcmd(self, message: Message):
"""Скидывает видео с котиком (работает в чатах где отключено медиa)"""
if message.out:
await message.delete()
await message.respond(
f'<a href="https://t.me/radiofmonline/{random.randint(282, 283)}">­</a>',
)

View File

@@ -1,60 +0,0 @@
# подпишись на тг канал @modwini
from .. import loader
@loader.tds
class bas(loader.Module):
"""Гимнт твича с Басбустом by @modwini"""
strings = {"name": "bas"}
async def b25cmd(self, message):
"""| 25%"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/286",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def b50cmd(self, message):
"""| 50%?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/287",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def b75cmd(self, message):
"""| 75%"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/288",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def b100cmd(self, message):
"""| 100%"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/289",
voice_note=True,
reply_to=reply.id if reply else None,
)

View File

@@ -1,359 +0,0 @@
from .. import loader
@loader.tds
class voiceGirls(loader.Module):
"""Голосовые сообщения девушек by @modwini"""
strings = {"name": "voiceGirls"}
async def приветикcmd(self, message):
"""| Приветик"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/195",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def кдcmd(self, message):
"""| Как дела?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/198",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def даcmd(self, message):
"""| Да"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/197",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нетcmd(self, message):
"""| Нет"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/196",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def жальcmd(self, message):
"""| очень жаль"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/199",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def недоверяюcmd(self, message):
"""| я тебе не доверяю"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/200",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def подождиcmd(self, message):
"""| подожди"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/201",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def спокcmd(self, message):
"""| спокойной ночи"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/202",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ясноcmd(self, message):
"""| ясно"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/203",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def обидcmd(self, message):
"""| я обиделась"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/204",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def тмнcmd(self, message):
"""| ты мне нравишся"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/205",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def мурcmd(self, message):
"""| мур"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/206",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def пжcmd(self, message):
"""| ну пожалуйста"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/207",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def спсcmd(self, message):
"""| спасибо"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/208",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def тыгдеcmd(self, message):
"""| Ну ты где?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/209",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def догcmd(self, message):
"""| Договорились"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/210",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def дутроcmd(self, message):
"""| Доброе утро"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/211",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def кснемогуcmd(self, message):
"""| К сожалению не могу"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/212",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нипонcmd(self, message):
"""| Нипоняла"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/213",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def интересноcmd(self, message):
"""| Расскажи мне интересно"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/214",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def чмокиcmd(self, message):
"""| Чмоки чмоки"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/215",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def спок2cmd(self, message):
"""| Спокойной ночи тебе"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/216",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def тыменялюбишьcmd(self, message):
"""| А ты меня любишь?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/217",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нукотикcmd(self, message):
"""| Ну котик"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/218",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def котикcmd(self, message):
"""| Котик"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/219",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def блинcmd(self, message):
"""| Ну блин"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/220",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def скоробудуcmd(self, message):
"""| Скоро буду"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/221",
voice_note=True,
reply_to=reply.id if reply else None,
)
return

View File

@@ -1,54 +0,0 @@
# meta developer: @modwini
import io
import random
import requests
from pydub import AudioSegment
from telethon.tl.types import Message
from .. import loader, utils
@loader.tds
class KeywordMod(loader.Module):
"""Присылает громкое голосовое сообщение +_+"""
strings = {"name": "громкие гс"}
@loader.unrestricted
async def micmd(self, message: Message):
"""Скинуть гс"""
args = utils.get_args_raw(message) or "<i></i>"
mi = [
"https://github.com/Ijidishurka/gs/blob/main/%D0%B7%D0%B0%D0%B9%D1%82%D0%B8%20%D0%B2%20%D0%BA%D0%BB%D0%B5%D1%88.mp3?raw=true",
"https://github.com/Ijidishurka/gs/blob/main/%D1%85%D0%B8%D1%85%D0%B8%D1%85%D0%B8%D1%85%D0%B0.m4a?raw=true",
]
voice = (await utils.run_sync(requests.get, random.choice(mi))).content
byte = io.BytesIO(b"0")
segm = AudioSegment.from_file(io.BytesIO(voice))
random_duration = random.randint(5000, 15000)
end = len(segm) - random_duration
end = len(segm) if end < 0 else end
random_begin = random.randint(0, end)
random_begin = 0 if end < 0 else random_begin
segm[random_begin : min(len(segm), random_begin + random_duration)].export(
byte,
format="ogg",
)
byte.name = "mi.ogg"
await self._client.send_file(
message.peer_id,
byte,
caption=args,
voice_note=True,
reply_to=message.reply_to_msg_id,
)
if message.out:
await message.delete()

View File

@@ -1,28 +0,0 @@
# Канал - @modwini
from .. import loader
from asyncio import sleep
@loader.tds
class elpe(loader.Module):
strings = {"name": "ЛП by @modwini"}
@loader.owner
async def elpecmd(self, message):
for _ in range(1):
for elpe in ["Крестики нолики❌",
"Две Миланы в домике🏚️",
"Укатились даже шарики за ролики🎱",
"Улы-улыбаемся, разгоняя тучки⛅",
"Люди обзываются что мы две почемучки😔",
"Отпути😤", "не путю😉",
"Но кому я говорю🤬",
"Не путю, ведь я люблю❤️",
"Свою лучшую подругу🤥",
"Отпути😶", "не путю😗",
"Но кому я говорю🙄",
"Не путю ведь я люблю💖",
"Навсегда мы друг для друга🥵",
"Элпе пе пе пе пе пе, пе пе🤤"]:
await message.edit(elpe)
await sleep(1.2)

View File

@@ -1,28 +0,0 @@
import random
import logging
from .. import loader, utils
from random import randint, choice
logger = logging.getLogger(__name__)
def register(cb):
cb(magic_ball())
class magic_ball(loader.Module):
"""Волшебный шар by @modwini"""
strings = {'name': 'Magic Ball'}
async def ballcmd(self, message):
"""Используй ball <вопрос>."""
text = utils.get_args_raw(message)
if not text:
await message.edit('<b>Нет вопроса после команды 0_0 </b>')
return
else:
list = ['да', 'нет']
list2 = ['Я думаю', 'Наверное', 'Скорее всего', 'Точно']
ball = (f"🗣️<code>{text}</code>\n" + f"<b>🔮{random.choice(list2)} {random.choice(list)}</b>")
await message.edit(ball)

View File

@@ -1,23 +0,0 @@
# meta developer: @modwini
from .. import loader
from asyncio import sleep
@loader.tds
class rap(loader.Module):
strings = {"name": "Реп оксимирона"}
@loader.owner
async def rapcmd(self, message):
for _ in range(1):
for rap in ["Говно", "залупа", "пенис", "хер", "давалка", "хуй", "блядина",
"Головка", "шлюха", "жопа", "член", "еблан", "петух…", "Мудила",
"Рукоблуд", "ссанина", "очко", "блядун", "вагина",
"Сука", "ебланище", "влагалище", "пердун", "дрочила",
"Пидор", "пизда", "туз", "малафья",
"Гомик", "мудила", "пилотка", "манда"
"Анус", "вагина", "путана", "педрила",
"Шалава", "хуило", "мошонка", "елда…",
"Раунд!"]:
await message.edit(rap)
await sleep(0.3)

View File

@@ -1,19 +0,0 @@
import random
from .. import loader
from telethon.tl.types import Message
@loader.tds
class кругляш(loader.Module):
"""Подпишись на канал @modwini"""
strings = {"name": "кругляш"}
async def krcmd(self, message: Message):
"""Кидает рандом видео сообщение из канала @kruglishik"""
if message.out:
await message.delete()
await message.respond(
f'<a href="https://t.me/kruglishik/{random.randint(6, 44)}">­</a>',
)

View File

@@ -1,25 +0,0 @@
import random
from .. import loader
from asyncio import sleep
from telethon.tl.types import Message
from .. import loader, utils
@loader.tds
class ss(loader.Module):
"""Подпишись на канал @modwini"""
strings = {"name": "ss"}
async def sscmd(self, message: Message):
"""Скидывает медиа по ссылке (работает там где отключено медиа)"""
text = utils.get_args_raw(message)
if not text:
for ss in ["<b>Нету ссылки -_-</b>"]:
await message.edit(ss)
await sleep(0.5)
else:
await message.delete()
await message.respond(
f'<a href="{text}">­</a>',
)

View File

@@ -1,64 +0,0 @@
# meta developer: @modwini
import os
from .. import loader
from moviepy.editor import VideoFileClip
@loader.tds
class VideoToVoiceMod(loader.Module):
"""Модуль, который преобразует видео в голосовое сообщение или MP3 файл."""
strings = {"name": "video_to_voice"}
@loader.owner
async def гсcmd(self, message):
"""Команда гс, преобразующая видео в голосовое сообщение."""
await message.delete()
video_message = await message.get_reply_message()
if not video_message or not video_message.video:
await message.edit("Ответьте на видео!")
return
video_file = await video_message.download_media()
video_clip = VideoFileClip(video_file)
audio_clip = video_clip.audio
voice_file = "voice.ogg"
audio_clip.write_audiofile(voice_file, verbose=False, logger=None)
await message.client.send_file(
message.to_id,
voice_file,
voice_note=True,
reply_to=video_message.id
)
video_clip.close()
audio_clip.close()
os.remove(video_file)
os.remove(voice_file)
@loader.owner
async def mp3cmd(self, message):
"""Команда mp3, преобразующая видео в MP3 файл."""
await message.delete()
video_message = await message.get_reply_message()
if not video_message or not video_message.video:
await message.edit("Ответьте на видео!")
return
video_file = await video_message.download_media()
video_clip = VideoFileClip(video_file)
audio_clip = video_clip.audio
audio_file = "modwini.mp3"
audio_clip.write_audiofile(audio_file, verbose=False, logger=None)
await message.client.send_file(
message.to_id,
audio_file,
reply_to=video_message.id
)
video_clip.close()
audio_clip.close()
os.remove(video_file)
os.remove(audio_file)

View File

@@ -1,541 +0,0 @@
from .. import loader
@loader.tds
class voiceGirls2(loader.Module):
"""Голосовые сообщения девушек by @modwini"""
strings = {"name": "voiceGirls2"}
async def нупупсикcmd(self, message):
"""| Ну пупсик"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/239",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нуикактебеcmd(self, message):
"""| Ну и как тебе"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/240",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def тебеcmd(self, message):
"""| Ну тебе"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/241",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ичтоcmd(self, message):
"""| Ну и что"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/242",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ч969cmd(self, message):
"""| 969"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/243",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нискажуcmd(self, message):
"""| Ни скажу"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/244",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нормcmd(self, message):
"""| Нормально дела"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/245",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def хзcmd(self, message):
"""| Не знаю"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/246",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def кудаcmd(self, message):
"""| Куда?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/247",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ктоcmd(self, message):
"""| Кто?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/248",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def чотамcmd(self, message):
"""| Ну чо там"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/249",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def дадаcmd(self, message):
"""| Ну да да"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/250",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def молодецcmd(self, message):
"""| Какой молодец"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/251",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def машинаcmd(self, message):
"""| А какая у тебя машина"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/252",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ятебяхочуcmd(self, message):
"""| Я тебя хочу"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/253",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def наебалаcmd(self, message):
"""| Я тебя обвела вокруг носа"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/254",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def тебепиздаcmd(self, message):
"""| Я рассулу скажу он тебе жопу порвет"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/255",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def какаяcmd(self, message):
"""| Какая?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/256",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def какделаcmd(self, message):
"""| Как дела?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/257",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def какоеcmd(self, message):
"""| Какое ?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/258",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def янипонcmd(self, message):
"""| Я не понимаю тебя"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/259",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def адресcmd(self, message):
"""| Квартира 70, 4 этаж"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/260",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def серьёзноcmd(self, message):
"""| Я не шучу, Я серьёзно говорю"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/261",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def соглcmd(self, message):
"""| Я согласна"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/262",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ядомаcmd(self, message):
"""| Я дома"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/263",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def яснcmd(self, message):
"""| Ясно"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/264",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def японcmd(self, message):
"""| Я поняла"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/265",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def котенокcmd(self, message):
"""| Котенок"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/266",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def приветcmd(self, message):
"""| Привет"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/267",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def зачемcmd(self, message):
"""| Зачем"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/268",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ачоcmd(self, message):
"""| А чо"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/269",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def пруфыcmd(self, message):
"""| А чем ты докажешь?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/270",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ачтоcmd(self, message):
"""| А что?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/271",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def маринаcmd(self, message):
"""| А меня зовут Марина"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/272",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def гдеживешьcmd(self, message):
"""| А где ты живёшь?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/273",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def гдеэтоcmd(self, message):
"""| А где это?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/274",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def болтcmd(self, message):
"""| Ну болт"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/275",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нусегодняcmd(self, message):
"""| Ну сегодня я встала почистила зубки"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/276",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def какзовутcmd(self, message):
"""| Как вас зовут"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/277",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ябпосмотрелаcmd(self, message):
"""| Я бы посмотрела на это"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/278",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def тычегоcmd(self, message):
"""| Зай ну ты чего?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/279",
voice_note=True,
reply_to=reply.id if reply else None,
)
return

View File

@@ -1,334 +0,0 @@
# meta developer: @modwini
from telethon.tl.functions.channels import JoinChannelRequest
from .. import loader
@loader.tds
class voiceGirls3(loader.Module):
"""Голосовые сообщения девушек"""
strings = {"name": "voiceGirls3"}
async def прcmd(self, message):
"""| Привет"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/335",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def кдcmd(self, message):
"""| Как дела?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/336",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def привcmd(self, message):
"""| Приветик"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/337",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нормcmd(self, message):
"""| Все нормально"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/338",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нуиcmd(self, message):
"""| Ну и что"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/339",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def хорошоcmd(self, message):
"""| Хорошо"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/340",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def аняcmd(self, message):
"""| Я Аня"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/341",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def мне19cmd(self, message):
"""| Мне 19 лет"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/342",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def хзcmd(self, message):
"""| не знаю"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/343",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def непонcmd(self, message):
"""| Не поняла"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/344",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def гоcmd(self, message):
"""| Ну давай"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/345",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def даcmd(self, message):
"""| Да"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/346",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def нудаcmd(self, message):
"""| Ну да"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/347",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def чтоcmd(self, message):
"""| Что?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/348",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def кудаcmd(self, message):
"""| Куда?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/349",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def спокcmd(self, message):
"""| Спокойной ночи"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/350",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def кнcmd(self, message):
"""| Как настроение?"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/351",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def добрcmd(self, message):
"""| Доброе утро"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/352",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def покаcmd(self, message):
"""| Пока"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/353",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def прощайcmd(self, message):
"""| Прощай"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/354",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def сладкихcmd(self, message):
"""| Сладких снов"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/355",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def ланcmd(self, message):
"""| Ну ладно"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/356",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def пжcmd(self, message):
"""| Ну пожалуйста"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/357",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def дядяcmd(self, message):
"""| Дядя не надо"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/358",
voice_note=True,
reply_to=reply.id if reply else None,
)
return
async def хмcmd(self, message):
"""| хмммм"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/359",
voice_note=True,
reply_to=reply.id if reply else None,
)
return

View File

@@ -1,65 +0,0 @@
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
from .. import loader, utils
def register(cb):
cb(voiceActing())
class voiceActing(loader.Module):
"""Подпишись на канал @modwini"""
strings = {"name": "voiceActing"}
def __init__(self):
self.name = self.strings["name"]
self._me = None
self._ratelimit = []
async def client_ready(self, client, db):
self._db = db
self._client = client
self.me = await client.get_me()
async def vcmd(self, event):
""".v <text> Вы можете сменить голос в боте @BigVoicyBot"""
user_msg = """{}""".format(utils.get_args_raw(event))
global reply_and_text
reply_and_text = False
if event.fwd_from:
return
if not event.reply_to_msg_id:
self_mess = True
if not user_msg:
await event.edit(".v")
return
elif event.reply_to_msg_id and user_msg:
reply_message = await event.get_reply_message()
reply_and_text = True
self_mess = True
elif event.reply_to_msg_id:
reply_message = await event.get_reply_message()
self_mess = False
chat = "@BigVoicyBot"
await event.edit("<code>Асуждаю...</code>")
async with event.client.conversation(chat) as conv:
try:
response = conv.wait_event(
events.NewMessage(incoming=True, from_users=656917446)
)
if not self_mess:
await event.client.forward_messages(chat, reply_message)
else:
await event.client.send_message(chat, user_msg)
response = await response
except YouBlockedUserError:
await event.reply("<code>Разблокируй </code>@AlpacaVoiceBot")
return
await event.delete()
if reply_and_text:
await event.client.send_file(
event.chat_id, response.voice, reply_to=reply_message.id
)
else:
await event.client.send_file(event.chat_id, response.voice)

View File

@@ -1,23 +0,0 @@
# канал @modwini
from .. import loader
@loader.tds
class hihihaha(loader.Module):
"""Громкий звук хихихаха👍
Подпишись на канал @modwini"""
strings = {"name": "hihihaha"}
async def hihicmd(self, message):
"""Отпровляет гс с громким звуком"""
reply = await message.get_reply_message()
await message.delete()
await message.client.send_file(
message.to_id,
"https://t.me/radiofmonline/194",
voice_note=True,
reply_to=reply.id if reply else None,
)
return

View File

@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/."""
__version__ = (2, 0, 0)
__version__ = (3, 0, 1)
# meta developer: @RUIS_VlP
# при поддержке @hikka_mods
@@ -26,12 +26,11 @@ import asyncio
import re
from typing import List
async def clean_domain(value: str) -> List[str]:
async def clean_domain(value: str) -> str:
# Убираем протокол, порт, путь
value = re.sub(r'^(https?://)?', '', value)
value = value.split('/')[0]
value = value.split(':')[0]
return value
async def ipcheck(value: str) -> str:
@@ -47,20 +46,53 @@ async def ipcheck(value: str) -> str:
return "domain"
async def get_whois(identifier, API_KEY: str) -> dict:
url = "https://api.jsonwhoisapi.com/v1/whois"
headers = {
"Authorization": API_KEY
}
params = {
"identifier": identifier
}
async with aiohttp.ClientSession() as session:
async with session.get(url, headers=headers, params=params) as resp:
resp.raise_for_status()
response = await resp.json()
return response
async def get_whois(identifier, API_KEY: str = None) -> dict:
"""Получение данных через RDAP для доменов и ipwho.is для IP"""
check = await ipcheck(identifier)
if check == "ip":
url = f"http://ipwho.is/{identifier}"
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp:
resp.raise_for_status()
response = await resp.json()
return response
else:
# Основной RDAP сервис
url_primary = f"https://rdap.org/domain/{identifier}"
# Резервный RDAP сервис
url_backup = f"https://rdap.active.domains/domain/{identifier}"
# Заголовки для обхода блокировок
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
'Accept': 'application/rdap+json, application/json'
}
async with aiohttp.ClientSession() as session:
try:
async with session.get(url_primary, headers=headers, timeout=aiohttp.ClientTimeout(total=10)) as resp:
if resp.status in (404, 403, 429, 500, 502, 503):
# Если ошибка на основном, пробуем резервный
async with session.get(url_backup, headers=headers) as resp_backup:
resp_backup.raise_for_status()
response = await resp_backup.json()
return response
resp.raise_for_status()
response = await resp.json()
return response
except aiohttp.ClientResponseError as e:
# Любая HTTP ошибка - пробуем резервный
async with session.get(url_backup, headers=headers) as resp_backup:
resp_backup.raise_for_status()
response = await resp_backup.json()
return response
except (aiohttp.ClientError, asyncio.TimeoutError):
# При ошибке соединения пробуем резервный
async with session.get(url_backup, headers=headers) as resp_backup:
resp_backup.raise_for_status()
response = await resp_backup.json()
return response
async def fetch_dns_record(session, domain, record_type):
url = "https://dns.google/resolve"
@@ -94,64 +126,166 @@ async def get_ips(domain):
ipv6_task = fetch_dns_record(session, domain, "AAAA")
ipv4, ipv6 = await asyncio.gather(ipv4_task, ipv6_task)
return [ipv4, ipv6]
async def json2text_ip(data: dict) -> str:
"""Форматирование данных IP из ipwho.is"""
def get(value):
return str(value) if value not in (None, '', [], {}) else 'Неизвестно'
if not data.get("success", False):
return f"❌ <b>IP адрес не найден или недоступен</b>"
ip = get(data.get("ip"))
ip_type = get(data.get("type"))
continent = get(data.get("continent"))
country = get(data.get("country"))
country_code = get(data.get("country_code"))
region = get(data.get("region"))
city = get(data.get("city"))
postal = get(data.get("postal"))
flag = data.get("flag", {})
flag_emoji = flag.get("emoji", "🌍")
connection = data.get("connection", {})
asn = get(connection.get("asn"))
org = get(connection.get("org"))
isp = get(connection.get("isp"))
domain = get(connection.get("domain"))
timezone_data = data.get("timezone", {})
timezone_id = get(timezone_data.get("id"))
timezone_utc = get(timezone_data.get("utc"))
lines = [
f"<emoji document_id=5224450179368767019>🌎</emoji><b>IP адрес:</b> <code>{ip}</code>",
f"<emoji document_id=4992466832364405778>🖥</emoji> <b>Тип:</b> <code>{ip_type}</code>",
"",
f"{flag_emoji} <b>Местоположение:</b>",
f" • Континент: <code>{continent}</code>",
f" • Страна: <code>{country} ({country_code})</code>",
f" • Регион: <code>{region}</code>",
f" • Город: <code>{city}</code>",
f" • Индекс: <code>{postal}</code>",
"",
f"<emoji document_id=5431376038628171216>🔗</emoji> <b>Подключение:</b>",
f" • ASN: <code>{asn}</code>",
f" • Организация: <code>{org}</code>",
f" • Провайдер: <code>{isp}</code>",
f" • Домен: <code>{domain}</code>",
"",
f"<emoji document_id=5431815452437257407>🕐</emoji> <b>Часовой пояс:</b>",
f" • Зона: <code>{timezone_id}</code>",
f" • UTC: <code>{timezone_utc}</code>",
]
return '\n'.join(line for line in lines if '<code>Неизвестно</code>' not in line)
async def json2text(data: dict, ips, check) -> str:
def get(value):
return str(value) if value not in (None, '', [], {}) else 'Неизвестно'
# Обработка RDAP формата
ldhName = data.get("ldhName", data.get("handle", ""))
# Проверка статуса регистрации
status = data.get("status", [])
status_str = ', '.join(status) if isinstance(status, list) else get(status)
if isinstance(status, list):
status_str = ', '.join(status) if status else 'Неизвестно'
else:
status_str = get(status)
nameservers = data.get("nameservers", []) or ['Неизвестнo']
registered = 'Да' if data.get('registered') else 'Нет'
if registered == "Нет":
return f"<emoji document_id=5224450179368767019>🌎</emoji><b>Домен:</b> <code>{(get(data.get('name'))).encode('ascii').decode('idna')}</code>\n\n<emoji document_id=4985637404867036136>🖥</emoji> <b>Домен свободен</b>"
# Проверка на свободный домен
if not ldhName or "object not found" in str(data).lower():
domain_name = data.get("ldhName", data.get("handle", "Неизвестно"))
return f"<emoji document_id=5224450179368767019>🌎</emoji><b>Домен:</b> <code>{domain_name}</code>\n\n<emoji document_id=4985637404867036136>🖥</emoji> <b>Домен свободен</b>"
# Извлечение событий (даты)
events = data.get("events", [])
created = next((e["eventDate"] for e in events if e.get("eventAction") == "registration"), None)
changed = next((e["eventDate"] for e in events if e.get("eventAction") == "last changed"), None)
expires = next((e["eventDate"] for e in events if e.get("eventAction") == "expiration"), None)
# Извлечение nameservers
nameservers_data = data.get("nameservers", [])
nameservers = [ns.get("ldhName", "Неизвестно") for ns in nameservers_data] if nameservers_data else ['Неизвестно']
# Извлечение контактов
entities = data.get("entities", [])
admin = {}
registrar = {}
for entity in entities:
roles = entity.get("roles", [])
if "administrative" in roles or "admin" in roles:
vcard = entity.get("vcardArray", [[]])
if len(vcard) > 1:
for field in vcard[1]:
if field[0] == "fn":
admin["name"] = field[3]
elif field[0] == "email":
admin["email"] = field[3]
elif field[0] == "org":
admin["organization"] = field[3]
elif field[0] == "adr":
if len(field[3]) > 6:
admin["country"] = field[3][6]
if "registrar" in roles:
vcard = entity.get("vcardArray", [[]])
registrar["name"] = entity.get("handle", "")
if len(vcard) > 1:
for field in vcard[1]:
if field[0] == "fn":
registrar["name"] = field[3]
elif field[0] == "email":
registrar["email"] = field[3]
elif field[0] == "tel":
registrar["phone"] = field[3]
registered = 'Да' if ldhName else 'Нет'
admin = (data.get("contacts", {}).get("admin") or [{}])[0]
registrar = data.get("registrar", {})
lines = [
f"<emoji document_id=5224450179368767019>🌎</emoji><b>Домен:</b> <code>{(get(data.get('name'))).encode('ascii').decode('idna')}</code>",]
if len(ips) > 0:
f"<emoji document_id=5224450179368767019>🌎</emoji><b>Домен:</b> <code>{ldhName}</code>",
]
if len(ips) > 0 and (ips[0] or ips[1]):
lines += ["<emoji document_id=4992466832364405778>🖥</emoji> <b>IP адреса:</b>"]
lines += [f" • <code>{ip}</code>" for ip in ips[0]]
lines += [f" • <code>{ip}</code>" for ip in ips[1]]
else:
pass
lines += [
"",
f"<emoji document_id=5274055917766202507>🗓</emoji> <b>Дата регистрации:</b> <code>{get(data.get('created'))}</code>",
f"♻️ <b>Изменено:</b> <code>{get(data.get('changed'))}</code>",
f"<emoji document_id=5325583469344989152>⏳</emoji><b>Истекает:</b> <code>{get(data.get('expires'))}</code>",
f"<emoji document_id=5274055917766202507>🗓</emoji> <b>Дата регистрации:</b> <code>{get(created)}</code>",
f"♻️ <b>Изменено:</b> <code>{get(changed)}</code>",
f"<emoji document_id=5325583469344989152>⏳</emoji><b>Истекает:</b> <code>{get(expires)}</code>",
f"<emoji document_id=5206607081334906820>✔️</emoji> <b>Зарегистрирован:</b> <code>{registered}</code>",
f"<emoji document_id=5231200819986047254>📊</emoji> <b>Статус:</b> <code>{status_str}</code>",
"",]
if check == "domain":
lines += [
f"<emoji document_id=4985545282113503960>🖥</emoji> <b>DNS-серверы:</b>",
"",
]
if check == "domain" and nameservers[0] != 'Неизвестно':
lines += ["<emoji document_id=4985545282113503960>🖥</emoji> <b>DNS-серверы:</b>"]
lines += [f" • <code>{ns}</code>" for ns in nameservers]
lines += [
"",
"<emoji document_id=5936110055404342764>👤</emoji> <b>Админ-контакт:</b>",
f" • Имя: <code>{get(admin.get('name'))}</code>",
f" • Email: <code>{get(admin.get('email'))}</code>",
f" • Организация: <code>{get(admin.get('organization'))}</code>",
f" • Страна: <code>{get(admin.get('country'))}</code>",
"",]
if check == "domain":
if admin:
lines += [
"<emoji document_id=5445353829304387411>💳</emoji> <b>Регистратор:</b>",
f" • ID: <code>{get(registrar.get('id'))}</code>",
f"Название: <code>{get(registrar.get('name'))}</code>",
f" • Email: <code>{get(registrar.get('email'))}</code>",
f"Сайт: <code>{get(registrar.get('url'))}</code>",
f"Телефон: <code>{get(registrar.get('phone'))}</code>",
]
"",
"<emoji document_id=5936110055404342764>👤</emoji> <b>Админ-контакт:</b>",
f"Имя: <code>{get(admin.get('name'))}</code>",
f" • Email: <code>{get(admin.get('email'))}</code>",
f"Организация: <code>{get(admin.get('organization'))}</code>",
f"Страна: <code>{get(admin.get('country'))}</code>",
"",
]
if check == "domain" and registrar:
lines += [
"<emoji document_id=5445353829304387411>💳</emoji> <b>Регистратор:</b>",
f" • Название: <code>{get(registrar.get('name'))}</code>",
f" • Email: <code>{get(registrar.get('email'))}</code>",
f" • Телефон: <code>{get(registrar.get('phone'))}</code>",
]
return '\n'.join(line for line in lines if '<code>Неизвестно</code>' not in line)
@@ -161,41 +295,32 @@ class WhoisMod(loader.Module):
strings = {"name": "Whois"}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"api_key",
"None",
lambda: "API ключ с сайта https://jsonwhoisapi.com/",
validator=loader.validators.String(),
),
)
@loader.command()
async def whois(self, message):
"""<домен> - получить информацию о домене или IP"""
api_key = self.config["api_key"]
if api_key == "None":
await utils.answer(message, '❌ <b>Не указан API ключ! Получите его на</b> jsonwhoisapi.com <b>и вставьте в config</b> (<code>.config Whois</code>)')
return
domain = ((utils.get_args_raw(message)).split()[0]).encode('idna').decode('ascii')
if not domain:
await utils.answer(message, "❌ <b>Вы не указали домен!</b>")
return
await utils.answer(message, "📡 <i>Отправляю запрос...</i>")
try:
check = await ipcheck(domain)
clean = await clean_domain(domain)
if check == "ip":
info = await get_whois(clean, api_key)
text = await json2text(info, [], "ip")
await utils.answer(message, text)
return
whois = get_whois(clean, api_key)
info = await get_whois(clean)
text = await json2text_ip(info)
await utils.answer(message, text)
return
whois = get_whois(clean)
ips = get_ips(clean)
info, ips = await asyncio.gather(whois, ips)
text = await json2text(info, ips, "domain")
await utils.answer(message, text)
except Exception as e:
await utils.answer(message, f"❌ <b>Ошибка!</b>\n\n<code>{e}</code>")
if "404" in str(e):
await utils.answer(message, f"<emoji document_id=5224450179368767019>🌎</emoji><b>Домен:</b> <code>{clean}</code>\n\n<emoji document_id=4985637404867036136>🖥</emoji> <b>Домен свободен</b>")
return
else:
await utils.answer(message, f"❌ <b>Ошибка!</b>\n\n<code>{e}</code>")

View File

@@ -55,7 +55,7 @@ class EnvsMod(loader.Module):
async def client_ready(self, client, db):
self.hmodslib = await self.import_lib(
"https://raw.githubusercontent.com/C0dwiz/H.Modules/refs/heads/main-fix/HModsLibrary.py"
"https://files.archquise.ru/HModsLibrary.py"
)
async def envcmd(self, message):

View File

@@ -60,7 +60,7 @@ class GigaChatMod(loader.Module):
async def client_ready(self, client, db):
self.hmodslib = await self.import_lib(
"https://raw.githubusercontent.com/C0dwiz/H.Modules/refs/heads/main-fix/HModsLibrary.py"
"https://files.archquise.ru/HModsLibrary.py"
)
def __init__(self):

View File

@@ -1,338 +0,0 @@
# Proprietary License Agreement
# Copyright (c) 2024-29 CodWiz
# Permission is hereby granted to any person obtaining a copy of this software and associated documentation files (the "Software"), to use the Software for personal and non-commercial purposes, subject to the following conditions:
# 1. The Software may not be modified, altered, or otherwise changed in any way without the explicit written permission of the author.
# 2. Redistribution of the Software, in original or modified form, is strictly prohibited without the explicit written permission of the author.
# 3. The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holder be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.
# 4. Any use of the Software must include the above copyright notice and this permission notice in all copies or substantial portions of the Software.
# 5. By using the Software, you agree to be bound by the terms and conditions of this license.
# For any inquiries or requests for permissions, please contact codwiz@yandex.ru.
# ---------------------------------------------------------------------------------
# Name: HModsLibrary
# Description: Library required for most H:Mods modules.
# Author: @hikka_mods
# ---------------------------------------------------------------------------------
# meta developer: @hikka_mods
# scope: HModsLibrary
# scope: HModsLibrary 0.0.1
# ---------------------------------------------------------------------------------
import logging
import re
import aiohttp
import random
import asyncio
import os
from bs4 import BeautifulSoup
from gigachat import GigaChat
from typing import Optional, Dict, Any
from .. import loader, utils
logger = logging.getLogger(__name__)
__version__ = (0, 0, 2)
class HModsLib(loader.Library):
"""Library required for most H:Mods modules."""
developer = "@hikka_mods"
version = __version__
async def config_complete(self):
self.set("goy_guru_api_token", None) # Initialize with None, user will set it
async def parse_time(self, time_str):
time_units = {"d": 86400, "h": 3600, "m": 60, "s": 1}
if not re.fullmatch(r"(\d+[dhms])+", time_str):
return None
seconds = 0
matches = re.findall(r"(\d+)([dhms])", time_str)
for amount, unit in matches:
seconds += int(amount) * time_units[unit]
return seconds if seconds > 0 else None
@staticmethod
def convert_size(size):
"""Convert file size to human-readable format."""
power = 2**10
n = 0
units = {0: "B", 1: "KB", 2: "MB", 3: "GB", 4: "TB"}
while size > power:
size /= power
n += 1
return round(size, 2), units[n]
async def upload_to_envs(self, path):
"""Upload file to envs.sh and return the URL."""
url = "https://envs.sh"
async with aiohttp.ClientSession() as session:
async with session.post(url, data={"file": open(path, "rb")}) as response:
if response.status != 200:
os.remove(path)
raise aiohttp.ClientResponseError(
request_info=response.request_info,
history=response.history,
status=response.status,
message=await response.text(),
headers=response.headers,
)
result = await response.text()
os.remove(path)
return result
async def get_creation_date(self, user_id: int) -> str:
api_token = "7518491974:1ea2284eec9dc40a9838cfbcb48a2b36"
url = "https://api.goy.guru/api/v1/users/getCreationDateFast"
params = {"token": api_token, "user_id": user_id}
async with aiohttp.ClientSession() as session:
async with session.get(url, params=params) as response:
if response.status == 200:
json_response = await response.json()
if json_response["success"]:
return {
"creation_date": json_response["creation_date"],
"accuracy_text": json_response["accuracy_text"],
} # type: ignore
else:
return {"error": json_response["error"]["message"]} # type: ignore
else:
return {"error": f"HTTP {response.status}"} # type: ignore
async def get_giga_response(self, api_key, query):
"""Gets a response from GigaChat with the specified query."""
async with GigaChat(
credentials=api_key,
scope="GIGACHAT_API_PERS",
model=self.config["GIGACHAT_MODEL"],
verify_ssl_certs=False,
) as giga:
response = giga.chat(query)
if response.choices:
return response.choices[0].message.content
return None
async def get_giga_models(self, api_key):
"""Gets a response from GigaChat with the specified query."""
async with GigaChat(
credentials=api_key, scope="GIGACHAT_API_PERS", verify_ssl_certs=False
) as giga:
response = giga.get_models()
if response:
return (
[model.id_ for model in response.data]
if hasattr(response, "data")
else []
)
return None
async def get_random_image():
random_site = random.randint(1, 3389)
url = f"https://www.memify.ru/memes/{random_site}"
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
content = await response.text()
soup = BeautifulSoup(content, "html.parser")
items = soup.find_all("div", {"class": "infinite-item card"})
random_item = random.choice(items)
second_a = random_item.find_all("a")[1]
img = second_a.get("href")
return img
async def virustotal_request(
self,
session: aiohttp.ClientSession,
url: str,
headers: Dict[str, str],
method: str = "GET",
data: Optional[Dict[str, Any]] = None,
files: Optional[Dict[str, Any]] = None,
) -> Optional[Dict[str, Any]]:
"""
Generic function to make requests to the VirusTotal API.
"""
try:
if files:
form = aiohttp.FormData()
for k, v in files.items():
form.add_field(k, v)
async with session.request(
method, url, headers=headers, data=form
) as response:
logger.debug(f"Response status: {response.status}")
logger.debug(f"Response body: {await response.text()}")
if response.status == 200:
return await response.json()
else:
logger.error(
f"VirusTotal API request failed with status: {response.status}, reason: {response.reason}"
)
return None
else:
async with session.request(
method, url, headers=headers, json=data
) as response:
logger.debug(f"Response status: {response.status}")
logger.debug(f"Response body: {await response.text()}")
if response.status == 200:
return await response.json()
else:
logger.error(
f"VirusTotal API request failed with status: {response.status}, reason: {response.reason}"
)
return None
except aiohttp.ClientError as e:
logger.exception(f"AIOHTTP Client error: {e}")
return None
except Exception as e:
logger.exception(f"An unexpected error occurred: {e}")
return None
async def get_upload_url(self, api_key: str) -> Optional[str]:
"""
Retrieves a special upload URL for large files.
"""
headers = {"x-apikey": api_key, "accept": "application/json"}
url = "https://www.virustotal.com/api/v3/files/upload_url"
async with aiohttp.ClientSession() as session:
response = await self.virustotal_request(session, url, headers)
if response and "data" in response and isinstance(response["data"], str):
return response["data"]
else:
logger.error(f"Failed to retrieve upload URL: {response}")
return None
async def scan_file_virustotal(
self, file_path: str, api_key: str, is_large_file: bool = False
) -> Optional[Dict[str, Any]]:
"""
Uploads a file to VirusTotal and retrieves the analysis results. Handles files larger than 32MB.
"""
headers = {"x-apikey": api_key}
url = "https://www.virustotal.com/api/v3/files"
async with aiohttp.ClientSession() as session:
try:
with open(file_path, "rb") as file:
files = {"file": file}
if is_large_file:
upload_url = await self.get_upload_url(api_key)
if not upload_url:
logger.error("Failed to get upload URL for large file.")
return None
url = upload_url
upload_response = await self.virustotal_request(
session, url, headers, method="POST", files=files
)
if (
upload_response
and "data" in upload_response
and "id" in upload_response["data"]
):
analysis_id = upload_response["data"]["id"]
analysis_url = (
f"https://www.virustotal.com/api/v3/analyses/{analysis_id}"
)
for attempt in range(20):
analysis_response = await self.virustotal_request(
session, analysis_url, headers
)
logger.debug(
f"Analysis response (attempt {attempt + 1}): {analysis_response}"
)
if (
analysis_response
and "data" in analysis_response
and "attributes" in analysis_response["data"]
and analysis_response["data"]["attributes"].get(
"status"
)
== "completed"
):
return analysis_response
await asyncio.sleep(10)
logger.warning(
f"Analysis not completed after multiple retries for ID: {analysis_id}"
)
return None
else:
logger.error(
f"File upload or analysis request failed: {upload_response}"
)
return None
except FileNotFoundError:
logger.error(f"File not found: {file_path}")
return None
except Exception as e:
logger.exception(f"An error occurred during file scanning: {e}")
return None
def format_analysis_results(self, analysis_results: Dict[str, Any]) -> str:
"""
Formats the analysis results into a user-friendly message, including specific detections.
"""
if (
not analysis_results
or "data" not in analysis_results
or "attributes" not in analysis_results["data"]
or "stats" not in analysis_results["data"]["attributes"]
or "results" not in analysis_results["data"]["attributes"]
):
logger.warning(
f"Unexpected structure in analysis_results: {analysis_results}"
)
return self.strings("error")
stats = analysis_results["data"]["attributes"]["stats"]
harmless = stats.get("harmless", 0)
malicious = stats.get("malicious", 0)
suspicious = stats.get("suspicious", 0)
undetected = stats.get("undetected", 0)
total_scans = harmless + malicious + suspicious + undetected
analysis_id = analysis_results["data"]["id"]
url = f"https://www.virustotal.com/gui/file-analysis/{analysis_id}"
text = (
f"<b>📊 VirusTotal Scan Results</b>\n\n"
f"🦠 <b>Detections:</b> {malicious} / {total_scans}\n"
f"🟢 <b>Harmless:</b> {harmless}\n"
f"⚠️ <b>Suspicious:</b> {suspicious}\n"
f"❓ <b>Undetected:</b> {undetected}\n\n"
)
if malicious > 0:
text += "<b>⚠️ Detections by engine:</b>\n"
results = analysis_results["data"]["attributes"]["results"]
for engine, result in results.items():
if result["category"] == "malicious":
engine_name = engine.replace("_", " ").title()
text += f" • <b>{engine_name}:</b> {result['result']}\n"
text += "\n"
return {"text": text, "url": url}

View File

@@ -53,7 +53,7 @@ class MemesMod(loader.Module):
async def client_ready(self, client, db):
self.hmodslib = await self.import_lib(
"https://raw.githubusercontent.com/C0dwiz/H.Modules/refs/heads/main-fix/HModsLibrary.py"
"https://files.archquise.ru/HModsLibrary.py"
)
@loader.command(

View File

@@ -91,7 +91,7 @@ class TempChatMod(loader.Module):
async def client_ready(self, client, db):
self.hmodslib = await self.import_lib(
"https://raw.githubusercontent.com/archquise/H.Modules/refs/heads/main/HModsLibrary.py"
"https://files.archquise.ru/HModsLibrary.py"
)
self.temp_chats = self.get("temp_chats", {})

View File

@@ -82,7 +82,7 @@ class VirusTotalMod(loader.Module):
async def client_ready(self, client, db):
self.hmodslib = await self.import_lib(
"https://raw.githubusercontent.com/C0dwiz/H.Modules/refs/heads/main-fix/HModsLibrary.py"
"https://files.archquise.ru/HModsLibrary.py"
)
@loader.command(

View File

@@ -114,7 +114,7 @@ class WindowsKeys(loader.Module):
)
async def _inline__give_key(self, call, winver):
url = "https://raw.githubusercontent.com/C0dwiz/H.Modules/refs/heads/assets/winkeys.json"
url = "https://files.archquise.ru/winkeys.json"
try:
response = requests.get(url)
response.raise_for_status()

View File

@@ -2,63 +2,93 @@
# https://github.com/all-licenses/GNU-General-Public-License-v3.0
# meta developer: @PyModule
# requires: lyricsgenius===3.7.0
from lyricsgenius import Genius
import requests
from bs4 import BeautifulSoup, Tag, NavigableString
import re
from .. import loader, utils
@loader.tds
class LyricsMod(loader.Module):
"""Модуль для поиска текста песни через Genius API"""
"""Модуль для поиска текста песни через Genius API напрямую"""
strings = {"name": "Lyrics"}
def __init__(self):
self.config = loader.ModuleConfig(
"GENIUS_TOKEN",
None,
"GENIUS_TOKEN",
None,
lambda: "Токен для доступа к Genius API. Получите его на https://genius.com/api-clients",
)
def get_genius(self):
def get_token(self):
token = self.config["GENIUS_TOKEN"]
if not token:
return None
return Genius(token, timeout=10)
return token
def lyrics(self, html: str) -> str:
soup = BeautifulSoup(html, "html.parser")
for remove in soup.find_all("div", class_=re.compile("LyricsHeader__Container")):
remove.decompose()
containers = soup.find_all("div", attrs={"data-lyrics-container": "true"})
if not containers:
return None
lyrics = ""
for container in containers:
for elem in container.contents:
if isinstance(elem, Tag):
if elem.name == "br":
lyrics += "\n"
else:
lyrics += elem.get_text(separator="\n")
elif isinstance(elem, NavigableString):
lyrics += str(elem)
lyrics = re.sub(r"\n{3,}", "\n\n", lyrics)
return lyrics.strip()
@loader.command()
async def lyrics(self, message):
async def lyricscmd(self, message):
"""[запрос] - Найти текст песни по запросу"""
genius = self.get_genius()
if not genius:
token = self.get_token()
if not token:
return await message.edit(
"<emoji document_id=5774077015388852135>❌</emoji> <b>Токен Genius API не установлен. Используйте <code>.cfg Lyrics</code>, чтобы добавить токен.</b>"
"<emoji document_id=5774077015388852135>❌</emoji> <b>Токен Genius API не установлен. Используйте <code>.cfg Lyrics</code>.</b>"
)
args = utils.get_args_raw(message)
if not args:
return await message.edit("<emoji document_id=5253959125838090076>👁</emoji> <b>Использование:</b> .lyrics [запрос]")
query = utils.get_args_raw(message)
if not query:
return await message.edit("<emoji document_id=5253959125838090076>👁</emoji> <b>Использование:</b> .lyrics [название песни]")
await message.edit(f"<emoji document_id=5253959125838090076>👁</emoji> <b>Ищу текст песни по запросу:</b> {args}...")
await message.edit(f"<emoji document_id=5253959125838090076>👁</emoji> <b>Ищу текст песни:</b> {query}...")
try:
search_results = genius.search_songs(args)
if not search_results or not search_results["hits"]:
return await message.edit("<emoji document_id=5774077015388852135>❌</emoji> <b>Ничего не найдено.</b>")
headers = {"Authorization": f"Bearer {token}"}
response = requests.get(f"https://api.genius.com/search?q={requests.utils.quote(query)}", headers=headers, timeout=10)
if response.status_code != 200:
return await message.edit(f"<b>Ошибка API Genius:</b> {response.status_code}")
song_info = search_results["hits"][0]["result"]
song = genius.search_song(song_info["title"], song_info["primary_artist"]["name"])
data = response.json()
hits = data.get("response", {}).get("hits", [])
if not hits:
return await message.edit("<emoji document_id=5774077015388852135>❌</emoji> <b>Песня не найдена.</b>")
if not song:
return await message.edit("<emoji document_id=5774077015388852135>❌</emoji> <b>Не удалось загрузить текст песни.</b>")
song_info = hits[0]["result"]
song_url = song_info["url"]
song_title = song_info["title"]
artist_name = song_info["primary_artist"]["name"]
lyrics = song.lyrics
if len(lyrics) > 4096:
html = requests.get(song_url).text
lyrics = self.lyrics(html)
if lyrics and len(lyrics) > 4096:
lyrics = lyrics[:4000] + "\n\n<b>Текст обрезан из-за ограничения Telegram.</b>"
await message.edit(
f"<b><emoji document_id=5938473438468378529>🎶</emoji> {song.title}{song.artist}</b>\n\n"
f"<blockquote><b>{lyrics}</b></blockquote>"
)
text = f"<b><emoji document_id=5938473438468378529>🎶</emoji> {song_title}{artist_name}</b>\n\n"
if lyrics:
text += f"<blockquote expandable><b>{lyrics}</b></blockquote>"
else:
text += f"<b><emoji document_id=5774077015388852135>❌</emoji> Текст песни не найден.</b>"
await message.edit(text)
except Exception as e:
await message.edit(f"<b>Ошибка:</b> {str(e)}")

View File

@@ -88,8 +88,10 @@ class WikiSearchMod(loader.Module):
"srsearch": query,
"srlimit": 1
}
async with aiohttp.ClientSession() as session:
headers = {
"User-Agent": "Mozilla/5.0 (Android 10; Mobile; rv:145.0) Gecko/145.0 Firefox/145.0"
}
async with aiohttp.ClientSession(headers=headers) as session:
async with session.get(search_url, params=params) as res:
data = await res.json()
results = data.get("query", {}).get("search", [])

View File

@@ -25,6 +25,7 @@ import logging
@loader.tds
class SenderGifts(loader.Module):
"""Модуль для отправки подарков Telegram прямиком в чате"""
strings = {
"name": "SenderGifts",
"usage": "<emoji document_id=4958526153955476488>❌</emoji> Используйте в формате: <code>.sendgift @username текст</code> или реплай + <code>.sendgift текст</code>",
@@ -54,6 +55,7 @@ class SenderGifts(loader.Module):
{"id": 5170144170496491616, "emoji": "🎂", "name": "Тортик"},
{"id": 5170314324215857265, "emoji": "💐", "name": "Цветы"},
{"id": 5170564780938756245, "emoji": "🚀", "name": "Ракета"},
{"id": 5922558454332916696, "emoji": "🎄", "name": "Ёлка"},
],
100: [
{"id": 5168043875654172773, "emoji": "🏆", "name": "Кубок"},

File diff suppressed because it is too large Load Diff