forked from sh-edraft.de/sh_discord_bot
Reviewed-on: sh-edraft.de/kd_discord_bot#124 Reviewed-by: Ebola-Chan <nick.jungmann@gmail.com> Closes #123
This commit is contained in:
commit
83d18da58f
@ -10,16 +10,26 @@ from bot_data.model.level import Level
|
||||
from bot_data.model.server import Server
|
||||
from bot_data.service.level_repository_service import LevelRepositoryService
|
||||
from modules.level.configuration.default_level_settings import DefaultLevelSettings
|
||||
from modules.level.service.level_service import LevelService
|
||||
|
||||
|
||||
class LevelSeeder(DataSeederABC):
|
||||
|
||||
def __init__(self, logger: DatabaseLogger, levels: DefaultLevelSettings, level_repo: LevelRepositoryService, servers: ServerRepositoryABC, bot: DiscordBotServiceABC):
|
||||
def __init__(
|
||||
self,
|
||||
logger: DatabaseLogger,
|
||||
levels: DefaultLevelSettings,
|
||||
level_repo: LevelRepositoryService,
|
||||
servers: ServerRepositoryABC,
|
||||
level: LevelService,
|
||||
bot: DiscordBotServiceABC
|
||||
):
|
||||
DataSeederABC.__init__(self)
|
||||
|
||||
self._logger = logger
|
||||
self._levels = level_repo
|
||||
self._servers = servers
|
||||
self._level = level
|
||||
self._bot = bot
|
||||
|
||||
self._level_header = levels.level_header
|
||||
@ -87,4 +97,7 @@ class LevelSeeder(DataSeederABC):
|
||||
except Exception as e:
|
||||
self._logger.error(__name__, f'Cannot change position of {role.name}', e)
|
||||
|
||||
for m in guild.members:
|
||||
await self._level.check_level(m)
|
||||
|
||||
self._logger.debug(__name__, f'Checked role order')
|
||||
|
Loading…
Reference in New Issue
Block a user