Skip to content

Commit

Permalink
Make [p]cog checkforupdates indicate when cog can't be updated on c…
Browse files Browse the repository at this point in the history
…urrent Red/Python version
  • Loading branch information
Jackenmen committed Mar 28, 2020
1 parent 35ebc48 commit 41c2b76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions redbot/cogs/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ async def _cog_checkforupdates(self, ctx: commands.Context) -> None:
async with ctx.typing():
cogs_to_check, failed = await self._get_cogs_to_check()
cogs_to_update, libs_to_update = await self._available_updates(cogs_to_check)
cogs_to_update, filter_message = self._filter_incorrect_cogs(cogs_to_update)

message = ""
if cogs_to_update:
cognames = [cog.name for cog in cogs_to_update]
Expand All @@ -877,6 +879,9 @@ async def _cog_checkforupdates(self, ctx: commands.Context) -> None:
message += _("\nThese shared libraries can be updated: ") + humanize_list(
tuple(map(inline, libnames))
)
if not (cogs_to_update or libs_to_update) and filter_message:
message += _("No cogs can be updated.")
message += filter_message

if not message:
message = _("All installed cogs are up to date.")
Expand Down

0 comments on commit 41c2b76

Please sign in to comment.