18 lines
608 B
Python
18 lines
608 B
Python
from typing import Dict
|
|
|
|
|
|
def render_plugin_config(name: str, cfg: Dict[str, object]) -> str:
|
|
lines = [f"Plugin: {name}"]
|
|
lines.append(f"Enabled: {cfg.get('enabled', True)}")
|
|
lines.append(f"Cooldown: {cfg.get('cooldown', 0)}")
|
|
lines.append(f"Auto-update: {cfg.get('auto_update', True)}")
|
|
prefix = cfg.get("command_prefix")
|
|
if prefix:
|
|
lines.append(f"Prefix: {prefix}")
|
|
settings = cfg.get("settings", {})
|
|
if settings:
|
|
lines.append("Settings:")
|
|
for key, value in settings.items():
|
|
lines.append(f"- {key}: {value}")
|
|
return "\n".join(lines)
|