Оформление канала навигации | version: 1
This commit is contained in:
32
CoreSub.py
32
CoreSub.py
@@ -9,8 +9,8 @@ from data.secrets.TOKEN import token
|
|||||||
class Bot(commands.Bot):
|
class Bot(commands.Bot):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
command_prefix="=",
|
command_prefix="=",
|
||||||
intents=disnake.Intents.all()
|
intents=disnake.Intents.all()
|
||||||
)
|
)
|
||||||
self.shutdown_flag = asyncio.Event()
|
self.shutdown_flag = asyncio.Event()
|
||||||
|
|
||||||
@@ -21,8 +21,36 @@ class Bot(commands.Bot):
|
|||||||
await self.change_presence(status=disnake.Status.online, activity=disnake.Game("Работаю"))
|
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")
|
print(f"{datetime.datetime.now().strftime('%H:%M:%S %d-%m-%Y')}:: KrekSupportBot activated")
|
||||||
|
|
||||||
|
await self.send_navigation()
|
||||||
|
|
||||||
self.shutdown_flag.set()
|
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():
|
async def main():
|
||||||
bot = Bot()
|
bot = Bot()
|
||||||
try:
|
try:
|
||||||
|
|||||||
35
commit.bat
Normal file
35
commit.bat
Normal file
@@ -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
|
||||||
2
version.txt
Normal file
2
version.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Оформление канала навигации
|
||||||
|
1
|
||||||
Reference in New Issue
Block a user