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,85 +1,85 @@
#
#█▀▄ ▀█ █ █▀█ █░█  █▀▀ ▄▀█ █▄█
#█▄▀ █▄ █ █▀▄ █▄█  █▄█ █▀█ ░█░
# 🔒 Licensed under the GNU AGPLv3
# 🌐 https://www.gnu.org/licenses/agpl-3.0.html
#
# meta developer: @dziru
# meta pic: https://raw.githubusercontent.com/DziruModules/assets/master/DziruModules.jpg
# meta banner: https://raw.githubusercontent.com/DziruModules/assets/master/AutoComment.png
# scope: hikka_only
# coded by: @dziru && @penggrin
from .. import loader, utils
import logging
logger = logging.getLogger(__name__)
@loader.tds
class AutoCommentMod(loader.Module):
"""Automatically comments under any channels you want"""
strings = {
"name": "AutoComment",
"disabled": "❌ Disabled",
"enabled": "✅ Enabled",
"status_now": "👌 AutoComment was <b>{}</b>!",
"config_status": "Are we ready to comment?",
"config_channels": "Under which channels i should comment? (ids)",
"config_message": "What i will comment?",
}
strings_ru = {
"disabled": "❌ Выключен",
"enabled": "✅ Включён",
"status_now": "👌 AutoComment теперь <b>{}</b>!",
"config_status": "Комментим ли мы?",
"config_channels": "Под каким каналами я должен комментировать (айди)",
"config_message": "Как я прокомментирую?",
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"status",
True,
lambda: self.strings("config_status"),
validator=loader.validators.Boolean()
),
loader.ConfigValue(
"message",
"I'm the first! 😎",
lambda: self.strings("config_message"),
validator=loader.validators.String()
),
loader.ConfigValue(
"channels",
[],
lambda: self.strings("config_channels"),
validator=loader.validators.Series(
loader.validators.Union(
loader.validators.Integer(),
)
)
),
)
@loader.watcher(only_messages=True, only_channels=True)
async def watcher(self, message):
if not self.config["status"]:
return
chat = utils.get_chat_id(message)
if chat not in self.config["channels"]:
return
await self.client.send_message(entity=chat, message=self.config["message"], comment_to=message)
logger.debug(f"commented on {message.id} in {chat}")
async def commentcmd(self, message):
"""Toggle Module <on/off>"""
self.config["status"] = not self.config["status"]
status = self.strings("enabled") if self.config["status"] else self.strings("disabled")
await utils.answer(message, self.strings("status_now").format(status))
#
#█▀▄ ▀█ █ █▀█ █░█  █▀▀ ▄▀█ █▄█
#█▄▀ █▄ █ █▀▄ █▄█  █▄█ █▀█ ░█░
# 🔒 Licensed under the GNU AGPLv3
# 🌐 https://www.gnu.org/licenses/agpl-3.0.html
#
# meta developer: @dziru
# meta pic: https://raw.githubusercontent.com/DziruModules/assets/master/DziruModules.jpg
# meta banner: https://raw.githubusercontent.com/DziruModules/assets/master/AutoComment.png
# scope: hikka_only
# coded by: @dziru && @penggrin
from .. import loader, utils
import logging
logger = logging.getLogger(__name__)
@loader.tds
class AutoCommentMod(loader.Module):
"""Automatically comments under any channels you want"""
strings = {
"name": "AutoComment",
"disabled": "❌ Disabled",
"enabled": "✅ Enabled",
"status_now": "👌 AutoComment was <b>{}</b>!",
"config_status": "Are we ready to comment?",
"config_channels": "Under which channels i should comment? (ids)",
"config_message": "What i will comment?",
}
strings_ru = {
"disabled": "❌ Выключен",
"enabled": "✅ Включён",
"status_now": "👌 AutoComment теперь <b>{}</b>!",
"config_status": "Комментим ли мы?",
"config_channels": "Под каким каналами я должен комментировать (айди)",
"config_message": "Как я прокомментирую?",
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"status",
True,
lambda: self.strings("config_status"),
validator=loader.validators.Boolean()
),
loader.ConfigValue(
"message",
"I'm the first! 😎",
lambda: self.strings("config_message"),
validator=loader.validators.String()
),
loader.ConfigValue(
"channels",
[],
lambda: self.strings("config_channels"),
validator=loader.validators.Series(
loader.validators.Union(
loader.validators.Integer(),
)
)
),
)
@loader.watcher(only_messages=True, only_channels=True)
async def watcher(self, message):
if not self.config["status"]:
return
chat = utils.get_chat_id(message)
if chat not in self.config["channels"]:
return
await self.client.send_message(entity=chat, message=self.config["message"], comment_to=message)
logger.debug(f"commented on {message.id} in {chat}")
async def commentcmd(self, message):
"""Toggle Module <on/off>"""
self.config["status"] = not self.config["status"]
status = self.strings("enabled") if self.config["status"] else self.strings("disabled")
await utils.answer(message, self.strings("status_now").format(status))

View File

@@ -1,40 +1,40 @@
#
#█▀▄ ▀█ █ █▀█ █░█  █▀▀ ▄▀█ █▄█
#█▄▀ █▄ █ █▀▄ █▄█  █▄█ █▀█ ░█░
# 🔒 Licensed under the GNU AGPLv3
# 🌐 https://www.gnu.org/licenses/agpl-3.0.html
# meta developer: @dziru
# meta pic: https://raw.githubusercontent.com/DziruModules/assets/master/DziruModules.jpg
# meta banner: https://raw.githubusercontent.com/DziruModules/assets/master/GitInfo.png
# scope: hikka_only
# version: 1.0
import requests
from .. import utils, loader
class GitInfoMod(loader.Module):
"""Get Github user info, simply type username"""
strings = {
"name": "GitInfo",
}
async def gitinfocmd(self, message):
"""<username>"""
args = utils.get_args_raw(message)
gitapi = "https://api.github.com/users/{}".format(args)
s = requests.get(gitapi)
if s.status_code != 404:
b = s.json()
avatar_url = b["avatar_url"]
html_url = b["html_url"]
name = b["name"]
blog = b["blog"]
location = b["location"]
bio = b["bio"]
created_at = b["created_at"]
await self._client.send_file(message.chat_id, caption="<emoji document_id=5974038293120027938>👤</emoji> <b>Name: </b><code>{}</code>\n<emoji document_id=5974492756494519709>🔗</emoji> <b>Link: </b><code>{}</code>\n\n<emoji document_id=5972183258090179945>💬</emoji> <b>Blog: </b><code>{}</code>\n<emoji document_id=5979027086612892618>📍</emoji> <b>Location: </b><code>{}</code>\n\n<emoji document_id=5972158252790582632>🗒</emoji> <b>Bio: </b><code>{}</code>\n<emoji document_id=6039550820855319523>🔎</emoji> <b>Profile Created: </b><code>{}</code>".format(name, html_url, blog, location, bio, created_at), file=avatar_url, force_document=False, allow_cache=False, reply_to=message)
await message.delete()
else:
await message.edit("<emoji document_id=5974097404754922968>🚫</emoji> <b>Username </b><code> {} </code><b>is not available</b>".format(args, s.text))
#
#█▀▄ ▀█ █ █▀█ █░█  █▀▀ ▄▀█ █▄█
#█▄▀ █▄ █ █▀▄ █▄█  █▄█ █▀█ ░█░
# 🔒 Licensed under the GNU AGPLv3
# 🌐 https://www.gnu.org/licenses/agpl-3.0.html
# meta developer: @dziru
# meta pic: https://raw.githubusercontent.com/DziruModules/assets/master/DziruModules.jpg
# meta banner: https://raw.githubusercontent.com/DziruModules/assets/master/GitInfo.png
# scope: hikka_only
# version: 1.0
import requests
from .. import utils, loader
class GitInfoMod(loader.Module):
"""Get Github user info, simply type username"""
strings = {
"name": "GitInfo",
}
async def gitinfocmd(self, message):
"""<username>"""
args = utils.get_args_raw(message)
gitapi = "https://api.github.com/users/{}".format(args)
s = requests.get(gitapi)
if s.status_code != 404:
b = s.json()
avatar_url = b["avatar_url"]
html_url = b["html_url"]
name = b["name"]
blog = b["blog"]
location = b["location"]
bio = b["bio"]
created_at = b["created_at"]
await self._client.send_file(message.chat_id, caption="<emoji document_id=5974038293120027938>👤</emoji> <b>Name: </b><code>{}</code>\n<emoji document_id=5974492756494519709>🔗</emoji> <b>Link: </b><code>{}</code>\n\n<emoji document_id=5972183258090179945>💬</emoji> <b>Blog: </b><code>{}</code>\n<emoji document_id=5979027086612892618>📍</emoji> <b>Location: </b><code>{}</code>\n\n<emoji document_id=5972158252790582632>🗒</emoji> <b>Bio: </b><code>{}</code>\n<emoji document_id=6039550820855319523>🔎</emoji> <b>Profile Created: </b><code>{}</code>".format(name, html_url, blog, location, bio, created_at), file=avatar_url, force_document=False, allow_cache=False, reply_to=message)
await message.delete()
else:
await message.edit("<emoji document_id=5974097404754922968>🚫</emoji> <b>Username </b><code> {} </code><b>is not available</b>".format(args, s.text))