mirror of
https://gitlab.com/octospacc/WinDog.git
synced 2025-06-05 22:09:20 +02:00
Remove rest of legacy code, fix bridges, complete Codings module
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
|
||||
# TODO: implement /help <commandname> feature
|
||||
def cHelp(context:EventContext, data:InputMessageData) -> None:
|
||||
text = (context.endpoint.get_string(lang=data.user.settings.language) or '')
|
||||
text = (context.endpoint.get_string(lang=data.user.settings.language) or '').strip()
|
||||
language = data.user.settings.language
|
||||
for module in Modules:
|
||||
summary = Modules[module].get_string("summary", language)
|
||||
@ -14,6 +14,7 @@ def cHelp(context:EventContext, data:InputMessageData) -> None:
|
||||
for endpoint in endpoints:
|
||||
summary = Modules[module].get_string(f"endpoints.{endpoint.names[0]}.summary", language)
|
||||
text += (f"\n* /{', /'.join(endpoint.names)}" + (f": {summary}" if summary else ''))
|
||||
text = text.strip()
|
||||
SendMessage(context, {"text_html": text})
|
||||
|
||||
RegisterModule(name="Help", group="Basic", endpoints=[
|
||||
|
Reference in New Issue
Block a user