- Drop reaction-based skill and confirmation helpers from Matrix conversion - Render !settings as a strict read-only dashboard snapshot - Align Matrix adapter regressions with command-only helper text
24 lines
718 B
Python
24 lines
718 B
Python
from __future__ import annotations
|
|
|
|
from sdk.interface import UserSettings
|
|
|
|
|
|
def build_skills_text(settings: UserSettings) -> str:
|
|
lines: list[str] = ["Скиллы"]
|
|
for name, enabled in settings.skills.items():
|
|
state = "on" if enabled else "off"
|
|
lines.append(f" {state} {name}")
|
|
lines.append("")
|
|
lines.append("!skill on/off <название> — переключить навык.")
|
|
return "\n".join(lines)
|
|
|
|
|
|
def build_confirmation_text(description: str) -> str:
|
|
return "\n".join(
|
|
[
|
|
"Lambda",
|
|
description,
|
|
"",
|
|
"Ответьте !yes для подтверждения или !no для отмены.",
|
|
]
|
|
)
|