diff --git a/royalnet/__main__.py b/royalnet/__main__.py index 47b9b383..2fc1a11e 100644 --- a/royalnet/__main__.py +++ b/royalnet/__main__.py @@ -95,7 +95,8 @@ def run(config_file: str): else: log.debug("__serfs__: Configured") - def configure_serf(n: str, module, class_: Type[rs.Serf]): + def configure_serf(n: str, module): + class_ = module.__getattribute__(f"{n}Serf") serf_cfg = serfs_cfg.get(n) if module is None: log.info(f"Serf.{n}: Not installed") @@ -122,8 +123,8 @@ def run(config_file: str): processes[f"Serf.{n}"] = ru.RoyalnetProcess(serf_constructor, None) log.info(f"Serf.{n}: Enabled") - configure_serf("Telegram", rst, rst.TelegramSerf) - configure_serf("Discord", rsd, rsd.DiscordSerf) + configure_serf("Telegram", rst) + configure_serf("Discord", rsd) # Constellation constellation_cfg = config.get("Constellation")