Merge pull request #41 from ancho/feature/shorter-modules-list

shorter modules list
This commit is contained in:
Frank Becker 2020-02-12 00:33:53 +01:00 committed by GitHub
commit ed020229a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -121,9 +121,8 @@ class MatrixModule(BotModule):
async def show_modules(self, bot, room): async def show_modules(self, bot, room):
await bot.send_text(room, "Modules:\n") await bot.send_text(room, "Modules:\n")
for modulename, module in collections.OrderedDict(sorted(bot.modules.items())).items(): for modulename, module in collections.OrderedDict(sorted(bot.modules.items())).items():
module_message = f"Name: {modulename}\n"\ state = 'Enabled' if module.enabled else 'Disabled'
f"Enabled: {module.enabled} (Can be disabled: {module.can_be_disabled})\n"\ module_message = f"{state}: {modulename} - {module.help()}"
f"Description: {module.help()}\n"
await bot.send_text(room, module_message) await bot.send_text(room, module_message)
def help(self): def help(self):