From bd27e5365db7e80d34a4525a6d3ac5000de45f59 Mon Sep 17 00:00:00 2001 From: squiddy Date: Mon, 1 Apr 2024 19:10:45 +0800 Subject: [PATCH] fix error_str creation --- bot/src/cogs/projects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/cogs/projects.py b/bot/src/cogs/projects.py index f6655bb..c4c494e 100644 --- a/bot/src/cogs/projects.py +++ b/bot/src/cogs/projects.py @@ -363,7 +363,7 @@ async def share( github_names_str = 'no members' if not len(github_accounts) else ', '.join(map(lambda github: f'```{github[0].github}```', github_accounts)) no_github_str = '' if not len(no_github) else 'no GitHub linked: ' + ', '.join(map(lambda member: f'```{member}```', no_github)) invalid_github_str = '' if not len(invalid_github) else 'invalid GitHub usernames: ' + ', '.join(map(lambda member: f'```{member}```', invalid_github)) - error_str = ', '.join([no_github_str, invalid_github_str]) + error_str = ', '.join(filter(None, [no_github_str, invalid_github_str])) await interaction.send(f"Project shared to {github_names_str} {f'({error_str})' if error_str else ''}")