Deployed cpl-discord==2022.7.0.post2

This commit is contained in:
Sven Heidemann 2022-07-17 16:11:33 +02:00
parent 72ee59b2b4
commit 721461fc1b
9 changed files with 21 additions and 24 deletions

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "2022",
"Minor": "7",
"Micro": "0.post1"
"Micro": "0.post2"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -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')

View File

@ -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')

View File

@ -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):

View File

@ -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