From 721461fc1b9b3b367c4d116115654f57e0300119 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 17 Jul 2022 16:11:33 +0200 Subject: [PATCH] Deployed cpl-discord==2022.7.0.post2 --- src/cpl_discord/__init__.py | 4 ++-- src/cpl_discord/application/__init__.py | 4 ++-- src/cpl_discord/command/__init__.py | 4 ++-- src/cpl_discord/configuration/__init__.py | 4 ++-- src/cpl_discord/cpl-discord.json | 2 +- src/cpl_discord/events/__init__.py | 4 ++-- src/cpl_discord/service/__init__.py | 4 ++-- src/cpl_discord/service/discord_collection.py | 12 +++++------- src/cpl_discord/service/discord_collection_abc.py | 7 +++---- 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/cpl_discord/__init__.py b/src/cpl_discord/__init__.py index 8fc33fc4..42c512c1 100644 --- a/src/cpl_discord/__init__.py +++ b/src/cpl_discord/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_discord' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -55,4 +55,4 @@ def get_discord_collection(services: 'ServiceCollectionABC') -> 'DiscordCollecti # build-ignore-end VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_discord/application/__init__.py b/src/cpl_discord/application/__init__.py index 3360e896..808b1473 100644 --- a/src/cpl_discord/application/__init__.py +++ b/src/cpl_discord/application/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_discord.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -24,4 +24,4 @@ from collections import namedtuple from .discord_bot_application_abc import DiscordBotApplicationABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_discord/command/__init__.py b/src/cpl_discord/command/__init__.py index f6f25542..f65b58ac 100644 --- a/src/cpl_discord/command/__init__.py +++ b/src/cpl_discord/command/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_discord.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -25,4 +25,4 @@ from .discord_command_abc import DiscordCommandABC from .discord_commands_meta import DiscordCogMeta VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_discord/configuration/__init__.py b/src/cpl_discord/configuration/__init__.py index 81f84057..6dac6e19 100644 --- a/src/cpl_discord/configuration/__init__.py +++ b/src/cpl_discord/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_discord.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -24,4 +24,4 @@ from collections import namedtuple from .discord_bot_settings import DiscordBotSettings VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_discord/cpl-discord.json b/src/cpl_discord/cpl-discord.json index c8be5b70..fc957cbf 100644 --- a/src/cpl_discord/cpl-discord.json +++ b/src/cpl_discord/cpl-discord.json @@ -4,7 +4,7 @@ "Version": { "Major": "2022", "Minor": "7", - "Micro": "0.post1" + "Micro": "0.post2" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_discord/events/__init__.py b/src/cpl_discord/events/__init__.py index fbfdc5fa..ca1a16be 100644 --- a/src/cpl_discord/events/__init__.py +++ b/src/cpl_discord/events/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_discord.events' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -72,4 +72,4 @@ from .on_voice_state_update_abc import OnVoiceStateUpdateABC from .on_webhooks_update_abc import OnWebhooksUpdateABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_discord/service/__init__.py b/src/cpl_discord/service/__init__.py index 7fb0353e..04d383e8 100644 --- a/src/cpl_discord/service/__init__.py +++ b/src/cpl_discord/service/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_discord.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -29,4 +29,4 @@ from .discord_service import DiscordService from .discord_service_abc import DiscordServiceABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_discord/service/discord_collection.py b/src/cpl_discord/service/discord_collection.py index 49e9d092..e6f0a93c 100644 --- a/src/cpl_discord/service/discord_collection.py +++ b/src/cpl_discord/service/discord_collection.py @@ -1,14 +1,12 @@ from typing import Type, Optional -from cpl_core.console import Console from cpl_core.dependency_injection import ServiceCollectionABC +from cpl_discord.command.discord_command_abc import DiscordCommandABC from cpl_discord.discord_event_types_enum import DiscordEventTypesEnum from cpl_discord.service.command_error_handler_service import CommandErrorHandlerService from cpl_discord.service.discord_collection_abc import DiscordCollectionABC from cpl_query.extension import List -from cpl_cli import CommandABC - class DiscordCollection(DiscordCollectionABC): @@ -17,15 +15,15 @@ class DiscordCollection(DiscordCollectionABC): self._services = service_collection self._events: dict[str, List] = {} - self._commands = List(type(CommandABC)) + self._commands = List(type(DiscordCommandABC)) self.add_event(DiscordEventTypesEnum.on_command_error.value, CommandErrorHandlerService) - def add_command(self, _t: Type[CommandABC]): - self._services.add_transient(CommandABC, _t) + def add_command(self, _t: Type[DiscordCommandABC]): + self._services.add_transient(DiscordCommandABC, _t) self._commands.append(_t) - def get_commands(self) -> List[CommandABC]: + def get_commands(self) -> List[DiscordCommandABC]: return self._commands def add_event(self, _t_event: Type, _t: Type): diff --git a/src/cpl_discord/service/discord_collection_abc.py b/src/cpl_discord/service/discord_collection_abc.py index 122eb100..719c3526 100644 --- a/src/cpl_discord/service/discord_collection_abc.py +++ b/src/cpl_discord/service/discord_collection_abc.py @@ -1,10 +1,9 @@ from abc import ABC, abstractmethod from typing import Type +from cpl_discord.command import DiscordCommandABC from cpl_query.extension import List -from cpl_cli import CommandABC - class DiscordCollectionABC(ABC): @@ -12,10 +11,10 @@ class DiscordCollectionABC(ABC): ABC.__init__(self) @abstractmethod - def add_command(self, _t: Type[CommandABC]): pass + def add_command(self, _t: Type[DiscordCommandABC]): pass @abstractmethod - def get_commands(self) -> List[CommandABC]: pass + def get_commands(self) -> List[DiscordCommandABC]: pass @abstractmethod def add_event(self, _t_event: Type, _t: Type): pass