Fixed switch channel handling

This commit is contained in:
Sven Heidemann 2023-01-19 18:25:38 +01:00
parent 1b5f87f869
commit b11ce18ac9
83 changed files with 157 additions and 152 deletions

View File

@ -14,5 +14,6 @@ RUN apk add nano
RUN pip install -r requirements.txt --extra-index-url https://pip.sh-edraft.de
RUN pip install flask[async]
RUN pip install dnspython==2.2.1 # https://stackoverflow.com/questions/75137717/eventlet-dns-python-attribute-error-module-dns-rdtypes-has-no-attribute-any
CMD [ "bash", "/app/bot/bot"]

View File

@ -15,7 +15,7 @@ __title__ = "bot"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

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

@ -1 +1 @@
Subproject commit 54b1b3860cb570d29c8ba2590dd082a1fa744265
Subproject commit b0ae87621bbe54fd9c5650071ec8c1c9ec32df48

View File

@ -15,7 +15,7 @@ __title__ = "bot.extension"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.abc"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.controller"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.controller.discord"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.event"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.exception"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.filter"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.filter.discord"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.logging"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.model"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.model.discord"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.route"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.transformer"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.abc"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

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

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.core_extension"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.events"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.exception"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.helper"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.logging"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.pipes"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_data"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.abc"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

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

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.migration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.model"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role.events"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role.helper"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.abc"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.events"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -48,7 +48,7 @@ class BaseOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC):
self._logger.info(__name__, f"Module {type(self)} loaded")
def _update_voice_state(self, joined: bool, dc_user_id: int, dc_channel_id: int, server: Server):
def _update_voice_state(self, joined: bool, dc_user_id: int, dc_channel_id: int, server: Server, switch=False):
user: Optional[User] = None
try:
user = self._users.get_user_by_discord_id_and_server_id(dc_user_id, server.server_id)
@ -61,16 +61,21 @@ class BaseOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC):
return
try:
if joined:
join = UserJoinedVoiceChannel(user, dc_channel_id, datetime.now())
end_date = datetime.now()
if joined and not switch:
join = UserJoinedVoiceChannel(user, dc_channel_id, end_date)
self._user_joins_vc.add_user_joined_voice_channel(join)
self._db.save_changes()
return
elif joined and switch:
join = UserJoinedVoiceChannel(user, dc_channel_id, end_date)
self._user_joins_vc.add_user_joined_voice_channel(join)
settings: BaseServerSettings = self._base_helper.get_config(server.discord_server_id)
join = self._user_joins_vc.get_active_user_joined_voice_channel_by_user_id(user.user_id)
join.leaved_on = datetime.now()
join.leaved_on = end_date
# ontime as hours
ontime = round((join.leaved_on - join.joined_on).total_seconds() / 3600, 2)
@ -136,7 +141,6 @@ class BaseOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC):
else:
self._logger.trace(__name__, f"User {member.id} switched to {after.channel}")
self._update_voice_state(False, member.id, before.channel.id, server)
self._update_voice_state(True, member.id, after.channel.id, server)
self._update_voice_state(True, member.id, before.channel.id, server, True)
except Exception as e:
self._logger.error(__name__, f"Cannot handle voice state for user {member.id}", e)

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.helper"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -1,12 +1,12 @@
from datetime import datetime
from cpl_core.database.context import DatabaseContextABC
from cpl_core.logging import LoggerABC
from cpl_discord.service import DiscordBotServiceABC
from discord import RawReactionActionEvent
from bot_core.abc.client_utils_abc import ClientUtilsABC
from bot_core.helper.log_message_helper import LogMessageHelper
from bot_core.logging.message_logger import MessageLogger
from bot_data.abc.server_repository_abc import ServerRepositoryABC
from bot_data.abc.user_repository_abc import UserRepositoryABC
from modules.base.abc.base_helper_abc import BaseHelperABC
@ -16,7 +16,7 @@ from modules.base.configuration.base_server_settings import BaseServerSettings
class BaseReactionHandler:
def __init__(
self,
logger: LoggerABC,
logger: MessageLogger,
bot: DiscordBotServiceABC,
servers: ServerRepositoryABC,
users: UserRepositoryABC,

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.thread"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.boot_log"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.boot_log.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.database"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

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

View File

@ -15,7 +15,7 @@ __title__ = "modules.level"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.events"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.abc"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.events"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.stats"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.stats.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.stats.model"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.stats.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.stats.ui"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.technician"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -15,7 +15,7 @@ __title__ = "modules.technician.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "0.3.1"
__version__ = "0.3.1.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="0", minor="3", micro="1")
version_info = VersionInfo(major="0", minor="3", micro="1.post1")

View File

@ -4,7 +4,7 @@
"Version": {
"Major": "0",
"Minor": "3",
"Micro": "1"
"Micro": "1.post1"
},
"Author": "",
"AuthorEmail": "",

View File

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

View File

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

View File

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