diff --git a/cloudbot/web/main.py b/cloudbot/web/main.py index 3d153f95e..d06c57f10 100644 --- a/cloudbot/web/main.py +++ b/cloudbot/web/main.py @@ -64,9 +64,11 @@ def get(self): doc = "Command has no documentation.".format(command) if plugin.permissions: - doc += " (Permission required: {})\n\n".format(", ".join(plugin.permissions)) + perm = ", ".join(plugin.permissions) + else: + perm = None - commands.append((cmd, doc)) + commands.append((cmd, doc, perm)) args = { 'bot_name': wi.config.get('bot_name', 'CloudBot'), diff --git a/cloudbot/web/templates/commands.html b/cloudbot/web/templates/commands.html index c7422a34c..fa40387d5 100644 --- a/cloudbot/web/templates/commands.html +++ b/cloudbot/web/templates/commands.html @@ -5,23 +5,32 @@
- - +

{{ bot_name }} has a large selection of commands that can do all kinds of useful tasks. + Below is an automatically-generated list of every command the bot currently knows.

+
- + + - {% for cmd, doc in commands %} + {% for cmd, doc, perm in commands %} + {% if perm %} + + {% else %} + + {% endif %} {% endfor %}
CommandCommand Description
{{ cmd | e }} {{ doc | e }} + +
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/cloudbot/web/templates/layout.html b/cloudbot/web/templates/layout.html index 3a8641f32..0594e9298 100644 --- a/cloudbot/web/templates/layout.html +++ b/cloudbot/web/templates/layout.html @@ -42,7 +42,7 @@ - {{ bot_name }} + {{ bot_name }} @@ -66,28 +66,35 @@