2022.12 #133

Merged
edraft merged 85 commits from 2022.12 into master 2022-12-25 11:58:35 +01:00
6 changed files with 65 additions and 12 deletions
Showing only changes of commit 604bb8f55c - Show all commits

View File

@ -1 +1,26 @@
# -*- coding: utf-8 -*-
"""
discord-bot
~~~~~~~~~~~~~~~~~~~
:copyright: (c)
:license:
"""
__title__ = 'discord_bot'
__author__ = ''
__license__ = ''
__copyright__ = 'Copyright (c) '
__version__ = '0.0.0'
from collections import namedtuple
# imports:
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='0', minor='0', micro='0')

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.7.0"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli>=2022.7.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},
@ -39,6 +39,8 @@
"*/tests"
],
"PackageData": {},
"ProjectReferences": []
"ProjectReferences": [
"../modules/hello_world/hello-world.json"
]
}
}

View File

@ -7,7 +7,7 @@ from discord_bot.application import Application
from discord_bot.startup import Startup
class Main:
class Program:
def __init__(self):
self._app: Optional[Application] = None
@ -23,8 +23,8 @@ class Main:
if __name__ == '__main__':
main = Main()
program = Program()
try:
asyncio.run(main.main())
asyncio.run(program.main())
except KeyboardInterrupt:
asyncio.run(main.stop())
asyncio.run(program.stop())

View File

@ -1,5 +1,6 @@
from cpl_core.application import StartupABC
from cpl_core.configuration import ConfigurationABC
from cpl_core.console import Console
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
from cpl_core.environment import ApplicationEnvironment
from cpl_discord import get_discord_collection
@ -16,7 +17,7 @@ class Startup(StartupABC):
StartupABC.__init__(self)
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
configuration.add_json_file('appsettings.json', optional=True)
configuration.add_json_file('appsettings.json', optional=False)
configuration.add_environment_variables('CPL_')
configuration.add_environment_variables('DISCORD_')

View File

@ -1 +1,26 @@
# -*- coding: utf-8 -*-
"""
discord-bot
~~~~~~~~~~~~~~~~~~~
:copyright: (c)
:license:
"""
__title__ = 'modules.hello_world'
__author__ = ''
__license__ = ''
__copyright__ = 'Copyright (c) '
__version__ = '0.0.0'
from collections import namedtuple
# imports:
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='0', minor='0', micro='0')

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.7.0"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli>=2022.7.0.post1"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},
@ -29,8 +29,8 @@
"ProjectType": "library",
"SourcePath": "",
"OutputPath": "../../dist",
"Main": "hello_world.main",
"EntryPoint": "hello-world",
"Main": "",
"EntryPoint": "",
"IncludePackageData": false,
"Included": [],
"Excluded": [