diff --git a/CoreSub.py b/CoreSub.py index a4eee29..fd40899 100644 --- a/CoreSub.py +++ b/CoreSub.py @@ -9,8 +9,8 @@ from data.secrets.TOKEN import token class Bot(commands.Bot): def __init__(self): super().__init__( - command_prefix="=", - intents=disnake.Intents.all() + command_prefix="=", + intents=disnake.Intents.all() ) self.shutdown_flag = asyncio.Event() @@ -21,8 +21,36 @@ class Bot(commands.Bot): await self.change_presence(status=disnake.Status.online, activity=disnake.Game("Работаю")) print(f"{datetime.datetime.now().strftime('%H:%M:%S %d-%m-%Y')}:: KrekSupportBot activated") + await self.send_navigation() + self.shutdown_flag.set() + class embed(disnake.Embed): + def __init__(self, **kwargs): + super().__init__( + color = 0x944509, + **kwargs + ) + + async def send_navigation(self): + navigation_channel = await self.krekchat.fetch_channel(1398723447399387247) + embeds = [] + + embeds.append( + self.embed( + title = "Краткое изложение", + description = """ + ❓Если вам просто спросить: <#649314697425846272> + """ + ) + ) + + await navigation_channel.purge(limit=1) + + webhooks = await navigation_channel.webhooks() + webhook = webhooks[0] + await webhook.send("", embeds=embeds, username="Навигатор") + async def main(): bot = Bot() try: diff --git a/commit.bat b/commit.bat new file mode 100644 index 0000000..5e530a3 --- /dev/null +++ b/commit.bat @@ -0,0 +1,35 @@ +@echo off +REM Скрипт для коммита и пуша в Git +setlocal enabledelayedexpansion +chcp 65001 + +REM Переход в директорию проекта (при необходимости) +cd /d "%~dp0" + +set count=0 + +for /f "usebackq delims=" %%A in ("version.txt") do ( + set /a count+=1 + + if !count! EQU 1 set "description=%%A" + if !count! EQU 2 set "version=%%A" + + if !count! GEQ 2 goto done +) +:done + +REM Получение комментария к коммиту +set commit_msg="%description% | version: %version%" + +REM echo %commit_msg% + +REM Добавление всех изменений +git add . + +REM Создание коммита +git commit -m %commit_msg% + +REM Отправка в основную ветку (main или master) +REM git push + +pause \ No newline at end of file diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..922f7eb --- /dev/null +++ b/version.txt @@ -0,0 +1,2 @@ +Оформление канала навигации +1 \ No newline at end of file