diff --git a/src/bot/bot.json b/src/bot/bot.json index e744e3b325..0fa1408b13 100644 --- a/src/bot/bot.json +++ b/src/bot/bot.json @@ -17,8 +17,8 @@ "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ "cpl-core>=2022.7.0.post4", - "cpl-translation==2022.7.0.post2", - "cpl-query==2022.7.0", + "cpl-translation==2022.10rc2", + "cpl-query==2022.10rc2", "cpl-discord==2022.7.0.post4" ], "DevDependencies": [ diff --git a/src/bot/config/appsettings.edrafts-pc-ubuntu.json b/src/bot/config/appsettings.edrafts-pc-ubuntu.json new file mode 100644 index 0000000000..8c26c3ea80 --- /dev/null +++ b/src/bot/config/appsettings.edrafts-pc-ubuntu.json @@ -0,0 +1,59 @@ +{ + "LoggingSettings": { + "Path": "logs/", + "Filename": "log_dev.log", + "ConsoleLogLevel": "DEBUG", + "FileLogLevel": "TRACE" + }, + "DatabaseSettings": { + "Host": "localhost", + "User": "kd_kdb", + "Password": "VGpZcihrb0N2T2MyZUlURQ==", + "Database": "keksdose_bot_dev", + "Charset": "utf8mb4", + "UseUnicode": "true", + "Buffered": "true", + "AuthPlugin": "mysql_native_password" + }, + "DiscordBot": { + "Token": "OTk4MTYwNDI3Njg5MTgxMjM3.GI7h67.BqD6Lu1Tz0MuG8iktYrcLnHi1pNozyMiWFGTKI", + "Prefix": "!ke " + }, + "Bot": { + "910199451145076828": { + "MessageDeleteTimer": 2 + }, + "Technicians": [ + 240160344557879316 + ], + "DeployFilesPath": "../../deploy" + }, + "Base": { + "910199451145076828": { + "MaxVoiceStateHours": 24, + "XpPerMessage": 2, + "XpPerOntimeHour": 4, + "AFKChannelIds": [ + 910199452915093593, + 910199452915093594 + ], + "AFKCommandChannelId": 910199452915093594, + "HelpCommandReferenceUrl": "https://git.sh-edraft.de/sh-edraft.de/kd_discord_bot/wiki/Befehle" + } + }, + "BootLog": { + "910199451145076828": { + "LoginMessageChannelId": "910199452915093588" + } + }, + "Permission": { + "910199451145076828": { + "AdminRoleIds": [ + 925072155203477584 + ], + "ModeratorRoleIds": [ + 925072209884635167 + ] + } + } +} diff --git a/src/bot/main.py b/src/bot/main.py index c2e53cf069..0bfb5a82c8 100644 --- a/src/bot/main.py +++ b/src/bot/main.py @@ -28,6 +28,8 @@ class Program: await self.app.run_async() async def stop(self): + if self.app is None: + return await self.app.stop_async() diff --git a/src/bot_data/service/user_joined_voice_channel_service.py b/src/bot_data/service/user_joined_voice_channel_service.py index bbcb3c9999..05e9824400 100644 --- a/src/bot_data/service/user_joined_voice_channel_service.py +++ b/src/bot_data/service/user_joined_voice_channel_service.py @@ -2,7 +2,7 @@ from typing import Optional from cpl_core.database.context import DatabaseContextABC from cpl_core.logging import LoggerABC -from cpl_query.extension import List, IterableABC +from cpl_query.extension import List from bot_data.abc.user_repository_abc import UserRepositoryABC from bot_data.model.user_joined_voice_channel import UserJoinedVoiceChannel