From f8cd150f7223bb04459851821f9851ba0da444f3 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 16 Jul 2022 19:05:39 +0200 Subject: [PATCH] Cleaned workspace --- cpl-workspace.json | 2 -- src/bot/bot.json | 5 ++-- src/bot/main.py | 3 +- src/bot/startup.py | 4 +-- src/bot_commands/__init__.py | 1 - src/bot_commands/bot-commands.json | 46 ------------------------------ src/bot_events/__init__.py | 1 - src/bot_events/bot-events.json | 46 ------------------------------ 8 files changed, 6 insertions(+), 102 deletions(-) delete mode 100644 src/bot_commands/__init__.py delete mode 100644 src/bot_commands/bot-commands.json delete mode 100644 src/bot_events/__init__.py delete mode 100644 src/bot_events/bot-events.json diff --git a/cpl-workspace.json b/cpl-workspace.json index 32428f91..b1235dbd 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -3,8 +3,6 @@ "DefaultProject": "bot", "Projects": { "bot": "src/bot/bot.json", - "bot-commands": "src/bot_commands/bot-commands.json", - "bot-events": "src/bot_events/bot-events.json", "bot-core": "src/bot_core/bot-core.json", "bot-data": "src/bot_data/bot-data.json" }, diff --git a/src/bot/bot.json b/src/bot/bot.json index cb799bbc..24b55e83 100644 --- a/src/bot/bot.json +++ b/src/bot/bot.json @@ -16,9 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.7.0", + "cpl-core>=2022.7.0.post1", "cpl-translation==2022.7.0", - "cpl-query==2022.7.0" + "cpl-query==2022.7.0", + "cpl-discord==2022.7.0" ], "DevDependencies": [ "cpl-cli>=2022.7.0.post1" diff --git a/src/bot/main.py b/src/bot/main.py index 16b8170b..ff378e28 100644 --- a/src/bot/main.py +++ b/src/bot/main.py @@ -14,5 +14,4 @@ async def main(): if __name__ == '__main__': - ml = asyncio.get_event_loop() - ml.run_until_complete(main()) + asyncio.run(main()) diff --git a/src/bot/startup.py b/src/bot/startup.py index dadaee3b..359c03d2 100644 --- a/src/bot/startup.py +++ b/src/bot/startup.py @@ -9,8 +9,8 @@ class Startup(StartupABC): def __init__(self): StartupABC.__init__(self) - async def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: + def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: return configuration - async def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: + def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: return services.build_service_provider() diff --git a/src/bot_commands/__init__.py b/src/bot_commands/__init__.py deleted file mode 100644 index ad5eca30..00000000 --- a/src/bot_commands/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# imports: diff --git a/src/bot_commands/bot-commands.json b/src/bot_commands/bot-commands.json deleted file mode 100644 index 021b62f1..00000000 --- a/src/bot_commands/bot-commands.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "ProjectSettings": { - "Name": "bot-commands", - "Version": { - "Major": "1", - "Minor": "0", - "Micro": "0.dev1" - }, - "Author": "Sven Heidemann", - "AuthorEmail": "sven.heidemann@sh-edraft.de", - "Description": "Keksdose bot - commands", - "LongDescription": "Discord bot for the Keksdose discord Server - command package", - "URL": "https://www.sh-edraft.de", - "CopyrightDate": "2022", - "CopyrightName": "sh-edraft.de", - "LicenseName": "MIT", - "LicenseDescription": "MIT, see LICENSE for more details.", - "Dependencies": [ - "cpl-core>=2022.7.0" - ], - "DevDependencies": [ - "cpl-cli>=2022.7.0" - ], - "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, - "Classifiers": [] - }, - "BuildSettings": { - "ProjectType": "console", - "SourcePath": "", - "OutputPath": "../../dist", - "Main": "", - "EntryPoint": "", - "IncludePackageData": false, - "Included": [], - "Excluded": [ - "*/__pycache__", - "*/logs", - "*/tests" - ], - "PackageData": {}, - "ProjectReferences": [] - } -} \ No newline at end of file diff --git a/src/bot_events/__init__.py b/src/bot_events/__init__.py deleted file mode 100644 index ad5eca30..00000000 --- a/src/bot_events/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# imports: diff --git a/src/bot_events/bot-events.json b/src/bot_events/bot-events.json deleted file mode 100644 index 16d53d94..00000000 --- a/src/bot_events/bot-events.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "ProjectSettings": { - "Name": "bot-events", - "Version": { - "Major": "1", - "Minor": "0", - "Micro": "0.dev1" - }, - "Author": "Sven Heidemann", - "AuthorEmail": "sven.heidemann@sh-edraft.de", - "Description": "Keksdose bot - events", - "LongDescription": "Discord bot for the Keksdose discord Server - event package", - "URL": "https://www.sh-edraft.de", - "CopyrightDate": "2022", - "CopyrightName": "sh-edraft.de", - "LicenseName": "MIT", - "LicenseDescription": "MIT, see LICENSE for more details.", - "Dependencies": [ - "cpl-core>=2022.7.0" - ], - "DevDependencies": [ - "cpl-cli>=2022.7.0" - ], - "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, - "Classifiers": [] - }, - "BuildSettings": { - "ProjectType": "console", - "SourcePath": "", - "OutputPath": "../../dist", - "Main": "", - "EntryPoint": "", - "IncludePackageData": false, - "Included": [], - "Excluded": [ - "*/__pycache__", - "*/logs", - "*/tests" - ], - "PackageData": {}, - "ProjectReferences": [] - } -} \ No newline at end of file