Repository: Cog-Creators/Red-DiscordBot

Issue:
`[p]findcog` should differentiate between core cogs and local cogs
Extracted from #3944 - `[p]findcog` for commands in core cogs should show:
```
Command: command_name
Cog name: CogName
Made by: 26 & Cog Creators
Repo: https://github.com/Cog-Creators/Red-DiscordBot
```
And something like this (the exact contents are debatable of course) when the cog is not installed through Downloader but isn't a core cog either:
```
Command: command_name
Cog name: CogName
Made by: Author unknown
Repo: None
```

Checking whether cog's `__module__` attribute starts with `redbot.` (checking for `redbot.cogs.` would exclude core commands) should be enough for this to work properly.


Discussion:

Resolving patch:
diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py
--- a/redbot/cogs/downloader/downloader.py
+++ b/redbot/cogs/downloader/downloader.py
@@ -1388,7 +1388,6 @@ async def findcog(self, ctx: commands.Context, command_name: str) -> None:
             cog_name = self.cog_name_from_instance(cog)
             installed, cog_installable = await self.is_installed(cog_name)
             if installed:
-                is_installable = True
                 made_by = humanize_list(cog_installable.author) or _("Missing from info.json")
                 repo_url = (
                     _("Missing from installed repos")
@@ -1396,12 +1395,14 @@ async def findcog(self, ctx: commands.Context, command_name: str) -> None:
                     else cog_installable.repo.clean_url
                 )
                 cog_name = cog_installable.name
-            else:
-                # Assume it's in a base cog
-                is_installable = False
-                made_by = "26 & co."
+            elif cog.__module__.startswith("redbot."):  # core commands or core cog
+                made_by = "Cog Creators"
                 repo_url = "https://github.com/Cog-Creators/Red-DiscordBot"
                 cog_name = cog.__class__.__name__
+            else:  # assume not installed via downloader
+                made_by = _("Unknown")
+                repo_url = _("None - this cog wasn't installed via downloader")
+                cog_name = cog.__class__.__name__
         else:
             msg = _("This command is not provided by a cog.")
             await ctx.send(msg)
@@ -1413,7 +1414,7 @@ async def findcog(self, ctx: commands.Context, command_name: str) -> None:
             embed.add_field(name=_("Cog Name:"), value=cog_name, inline=False)
             embed.add_field(name=_("Made by:"), value=made_by, inline=False)
             embed.add_field(name=_("Repo URL:"), value=repo_url, inline=False)
-            if is_installable and cog_installable.repo is not None and cog_installable.repo.branch:
+            if installed and cog_installable.repo is not None and cog_installable.repo.branch:
                 embed.add_field(
                     name=_("Repo branch:"), value=cog_installable.repo.branch, inline=False
                 )
@@ -1423,7 +1424,7 @@ async def findcog(self, ctx: commands.Context, command_name: str) -> None:
             msg = _(
                 "Command: {command}\nCog name: {cog}\nMade by: {author}\nRepo URL: {repo_url}\n"
             ).format(command=command_name, author=made_by, repo_url=repo_url, cog=cog_name)
-            if is_installable and cog_installable.repo is not None and cog_installable.repo.branch:
+            if installed and cog_installable.repo is not None and cog_installable.repo.branch:
                 msg += _("Repo branch: {branch_name}\n").format(
                     branch_name=cog_installable.repo.branch
                 )


Test patch: