Skip to content

Commit

Permalink
fix error_str creation
Browse files Browse the repository at this point in the history
  • Loading branch information
squi-ddy committed Apr 1, 2024
1 parent ba946e5 commit bd27e53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/src/cogs/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''}")

Expand Down

0 comments on commit bd27e53

Please sign in to comment.