mirror of
https://github.com/dizedev/vk_lp.git
synced 2026-09-17 05:09:00 +00:00
some updates
This commit is contained in:
+7
-8
@@ -1,4 +1,4 @@
|
|||||||
from sqlalchemy import (BigInteger, Column, Identity, Text)
|
from sqlalchemy import (BigInteger, Column, Identity, Text, JSON, TIMESTAMP)
|
||||||
from sqlalchemy.orm import DeclarativeBase
|
from sqlalchemy.orm import DeclarativeBase
|
||||||
|
|
||||||
|
|
||||||
@@ -22,10 +22,9 @@ class UsersProfile(Base):
|
|||||||
id = Column("id", BigInteger, Identity(start=1, increment=1, minvalue=1, cycle=False, cache=1), nullable=False,
|
id = Column("id", BigInteger, Identity(start=1, increment=1, minvalue=1, cycle=False, cache=1), nullable=False,
|
||||||
primary_key=True)
|
primary_key=True)
|
||||||
vkid = Column("vkid", BigInteger, nullable=False, unique=True)
|
vkid = Column("vkid", BigInteger, nullable=False, unique=True)
|
||||||
# TODO: fill items below
|
achievements = Column("achievements", JSON)
|
||||||
achievements = Column()
|
trusted_ids = Column("trusted_ids", JSON)
|
||||||
trusted_ids = Column()
|
prefix = Column("prefix", Text)
|
||||||
prefix = Column()
|
prefix_d = Column("prefix_d", Text)
|
||||||
prefix_d = Column()
|
prefix_delete = Column("prefix_delete", Text)
|
||||||
prefix_delete = Column()
|
last_login = Column("last_login", TIMESTAMP)
|
||||||
last_login = Column()
|
|
||||||
|
|||||||
+3
-13
@@ -2,9 +2,8 @@ import git
|
|||||||
import pytz
|
import pytz
|
||||||
from vkbottle.user import Message, UserLabeler
|
from vkbottle.user import Message, UserLabeler
|
||||||
|
|
||||||
from config import user, edit_message, prefix_bot
|
from config import edit_message, prefix_bot
|
||||||
from custom_rules.permission import Permission
|
from custom_rules.permission import Permission
|
||||||
from utils import rewards
|
|
||||||
|
|
||||||
bl = UserLabeler()
|
bl = UserLabeler()
|
||||||
|
|
||||||
@@ -15,15 +14,6 @@ async def about_cmd(ctx: Message):
|
|||||||
version = repo.head.object.hexsha[:7]
|
version = repo.head.object.hexsha[:7]
|
||||||
version_date = repo.head.object.committed_datetime.astimezone(pytz.timezone("Europe/Moscow"))
|
version_date = repo.head.object.committed_datetime.astimezone(pytz.timezone("Europe/Moscow"))
|
||||||
|
|
||||||
await edit_message(ctx,
|
# TODO: use Pillow to create img in real-time
|
||||||
"Информация о боте 🤖:\n\n"
|
|
||||||
"Название бота 🤖: dize_lp\n"
|
|
||||||
f"Версия бота ⚙️: {version} от {version_date}\n"
|
|
||||||
"Создатель бота 👨🦱: @dize_dev (Илдырым Денница)\n"
|
|
||||||
f"Достижения🏆: {rewards['creator']}")
|
|
||||||
|
|
||||||
await user.api.messages.send(
|
await edit_message(ctx, attachment="photo-202995525_457239051")
|
||||||
peer_id=ctx.peer_id,
|
|
||||||
random_id=0,
|
|
||||||
attachment="photo-202995525_457239051"
|
|
||||||
)
|
|
||||||
|
|||||||
+12
-4
@@ -1,6 +1,7 @@
|
|||||||
import git
|
import git
|
||||||
from vkbottle.user import Message, UserLabeler
|
from vkbottle.user import Message, UserLabeler
|
||||||
|
|
||||||
|
import db.requests
|
||||||
from config import edit_message, prefix_bot, prefix_dd
|
from config import edit_message, prefix_bot, prefix_dd
|
||||||
from custom_rules.permission import Permission
|
from custom_rules.permission import Permission
|
||||||
|
|
||||||
@@ -8,13 +9,20 @@ bl = UserLabeler()
|
|||||||
|
|
||||||
|
|
||||||
@bl.message(Permission(), text=[prefix_bot + " профиль"])
|
@bl.message(Permission(), text=[prefix_bot + " профиль"])
|
||||||
async def get_profile_cmd(message: Message):
|
async def get_profile_cmd(ctx: Message):
|
||||||
repo = git.Repo(search_parent_directories=True)
|
repo = git.Repo(search_parent_directories=True)
|
||||||
version = repo.head.object.hexsha[:7]
|
version = repo.head.object.hexsha[:7]
|
||||||
|
info = await db.requests.get_user_profile(user_id=ctx.from_id)
|
||||||
|
|
||||||
await edit_message(message,
|
await edit_message(ctx,
|
||||||
f"[ Impulse LP ]\n"
|
f"[ Impulse LP ]\n"
|
||||||
f"Текущая версия: {version}\n"
|
f"Текущая версия: {version}\n"
|
||||||
f"Основной префикс: {prefix_bot}\n"
|
f"Основной префикс: {info.prefix}\n"
|
||||||
f"Префикс дд: {prefix_dd}"
|
f"Префикс дд: {info.prefix_delete}\n"
|
||||||
|
f"{info.prefix_d}\n"
|
||||||
|
f"\nДостижения\n"
|
||||||
|
f"{info.achievements}\n"
|
||||||
|
f"Последний вход на сайт: {info.last_login}\n"
|
||||||
|
f"Довы:\n"
|
||||||
|
f"{info.trusted_ids}"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user