mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Update
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
from .discord import start_discord_sevice
|
||||
|
||||
|
||||
start = start_discord_sevice
|
||||
|
||||
|
||||
__all__ = ["start"]
|
||||
13
src/applications/games_list/__main__.py
Normal file
13
src/applications/games_list/__main__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from asyncio import run
|
||||
|
||||
from applications.games_list.discord import client, logger
|
||||
from core.config import config
|
||||
|
||||
|
||||
async def start_discord_sevice():
|
||||
logger.info("Starting Discord service...")
|
||||
|
||||
await client.start(config.DISCORD_BOT_TOKEN)
|
||||
|
||||
|
||||
run(start_discord_sevice())
|
||||
@@ -5,10 +5,9 @@ from discord.abc import Messageable
|
||||
from discord import Object
|
||||
from discord import app_commands
|
||||
|
||||
from modules.games_list.games_list import GameList, GameItem
|
||||
|
||||
from applications.common.repositories.streamers import StreamerConfigRepository
|
||||
from applications.games_list.games_list import GameList, GameItem
|
||||
from core.config import config
|
||||
from repositories.streamers import StreamerConfigRepository
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -240,9 +239,3 @@ async def replace(interaction: discord.Interaction, game: str, new: str):
|
||||
await game_list.save()
|
||||
|
||||
await interaction.response.send_message("Игра заменена!", ephemeral=True)
|
||||
|
||||
|
||||
async def start_discord_sevice():
|
||||
logger.info("Starting Discord service...")
|
||||
|
||||
await client.start(config.DISCORD_BOT_TOKEN)
|
||||
|
||||
Reference in New Issue
Block a user