stdplugins/plugins: fix

This commit is contained in:
Dan Elkouby 2020-04-06 14:50:05 +00:00
parent bff5fd02dd
commit d18b85a709
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ from telethon import events
@borg.on(events.NewMessage(pattern=r"\.plugins", outgoing=True)) @borg.on(events.NewMessage(pattern=r"\.plugins", outgoing=True))
async def _(event): result = f'{len(borg._plugins)} plugins loaded:' async def _(event):
result = f'{len(borg._plugins)} plugins loaded:'
for name, mod in sorted(borg._plugins.items(), key=lambda t: t[0]): for name, mod in sorted(borg._plugins.items(), key=lambda t: t[0]):
desc = (mod.__doc__ or '__no description__').replace('\n', ' ').strip() desc = (mod.__doc__ or '__no description__').replace('\n', ' ').strip()
result += f'\n**{name}**: {desc}' result += f'\n**{name}**: {desc}'