Оформление канала информации к тестовому турниру RuinShip | version: 5

This commit is contained in:
2025-08-03 01:37:42 +03:00
parent 12303abb88
commit 15046a48a5
2 changed files with 23 additions and 19 deletions

View File

@@ -3,6 +3,7 @@ from disnake.ext import commands
import asyncio import asyncio
import datetime import datetime
import sys import sys
import argparse
from data.secrets.TOKEN import token from data.secrets.TOKEN import token
@@ -31,6 +32,10 @@ class Bot(commands.Bot):
super().__init__(color = color, **kwargs) super().__init__(color = color, **kwargs)
async def send_navigation(self): async def send_navigation(self):
parser = argparse.ArgumentParser(description="Мой CLI скрипт")
parser.add_argument('--mode', choices=['debug', 'release'], default='debug', help='Режим запуска (debug)')
args = parser.parse_args()
navigation_channel = await self.krekchat.fetch_channel(1399856075519561839) navigation_channel = await self.krekchat.fetch_channel(1399856075519561839)
embeds = [ embeds = [
@@ -71,7 +76,7 @@ class Bot(commands.Bot):
self.embed( self.embed(
description = """ description = """
## 📆 Крайние сроки подачи заявок ## 📆 Крайние сроки подачи заявок
Заявки на участие в турнире принимаются до <t:1754730000:D>. После окончания приёма заявок в течение недели мы исправим все ошибки и проблемы и начнём основной этап. Заявки на участие в тестовом турнире принимаются до <t:1754730000:D>. После окончания приёма заявок в течение недели мы исправим все ошибки и проблемы и начнём основной этап.
""" """
), ),
self.embed( self.embed(
@@ -97,23 +102,22 @@ class Bot(commands.Bot):
), ),
] ]
test_channel = await self.krekchat.fetch_channel(1382446742087270562) if args.mode == 'debug':
for embed in embeds: test_channel = await self.krekchat.fetch_channel(1382446742087270562)
if isinstance(embed, list): for embed in embeds:
await test_channel.send("", embeds=embed) if isinstance(embed, list):
else: await test_channel.send("", embeds=embed)
await test_channel.send("", embed=embed) else:
#return await test_channel.send("", embed=embed)
else:
#await navigation_channel.send("", embeds=embeds) #await navigation_channel.send("", embeds=embeds)
webhooks = await navigation_channel.webhooks()
webhooks = await navigation_channel.webhooks() webhook = webhooks[0]
webhook = webhooks[0] for embed in embeds:
for embed in embeds: if isinstance(embed, list):
if isinstance(embed, list): await webhook.send("", embeds=embed, username="Ruin Ship")
await webhook.send("", embeds=embed, username="Ruin Ship") else:
else: await webhook.send("", embed=embed, username="Ruin Ship")
await webhook.send("", embed=embed, username="Ruin Ship")
async def main(): async def main():
bot = Bot() bot = Bot()

View File

@@ -1,2 +1,2 @@
Оформление канала информации к тестовому турниру RuinShip Оформление канала информации к тестовому турниру RuinShip
4 5