Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Pretties up the output when libraries fail to install #2576
Description of the changes
Previously, when a cog failed to install libraries, the resulting message would print the raw list of requirements. This PR changes that message to comma separate those libraries in order to look nicer.
Your code's completely fine, but I just wanted to let you know, that we have inline and humanize_list functions (you can see, that we use those in other places in downloader) in redbot.core.utils.chat_formatting, where inline adds inline formatting to string and also makes sure to use double ticks, when tick is already in the text (that doesn't matter here, but just wanted to point that out) and humanize_list functions (you can see, that we use those in other places in downloader) gives you comma-separated list, with the last element joined with and.
We use those in other places where we send cogs or libraries names, so it might be better to use it.
You can use them together like that (it's used like this in all other places in downloader):
or like that (that doesn't require converting map to tuple, so might be better, but since map is used everywhere, I'm not so sure, if it's better):
humanize_list([inline(req) for req in cog.requirements])