Formatted stuff #405
This commit is contained in:
@@ -13,9 +13,7 @@ class ConfigExtension(ApplicationExtensionABC):
|
||||
pass
|
||||
|
||||
async def run(self, config: ConfigurationABC, services: ServiceProviderABC):
|
||||
feature_flags: FeatureFlagsSettings = config.get_configuration(
|
||||
FeatureFlagsSettings
|
||||
)
|
||||
feature_flags: FeatureFlagsSettings = config.get_configuration(FeatureFlagsSettings)
|
||||
if not feature_flags.get_flag(FeatureFlagsEnum.config_module):
|
||||
return
|
||||
logger: LoggerABC = services.get_service(LoggerABC)
|
||||
|
@@ -13,12 +13,8 @@ class ConfigModule(ModuleABC):
|
||||
def __init__(self, dc: DiscordCollectionABC):
|
||||
ModuleABC.__init__(self, dc, FeatureFlagsEnum.config_module)
|
||||
|
||||
def configure_configuration(
|
||||
self, config: ConfigurationABC, env: ApplicationEnvironmentABC
|
||||
):
|
||||
def configure_configuration(self, config: ConfigurationABC, env: ApplicationEnvironmentABC):
|
||||
pass
|
||||
|
||||
def configure_services(
|
||||
self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC
|
||||
):
|
||||
def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC):
|
||||
services.add_transient(DiscordEventTypesEnum.on_ready.value, ConfigOnReadyEvent)
|
||||
|
@@ -26,6 +26,4 @@ class ConfigOnReadyEvent(OnReadyABC):
|
||||
|
||||
async def on_ready(self):
|
||||
for guild in self._bot.guilds:
|
||||
await self._config_service.reload_server_config(
|
||||
self._servers.get_server_by_discord_id(guild.id)
|
||||
)
|
||||
await self._config_service.reload_server_config(self._servers.get_server_by_discord_id(guild.id))
|
||||
|
Reference in New Issue
Block a user