mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
[V3 Core] Moved [p]cogs command to CogManager (#1076)
* Move cogs command to CogManager * Move cogs command to CogManager * self.bot -> ctx.bot * Typing * Missing import
This commit is contained in:
@@ -185,28 +185,6 @@ class Downloader:
|
||||
elif target.is_file():
|
||||
os.remove(str(target))
|
||||
|
||||
@commands.command()
|
||||
@checks.is_owner()
|
||||
async def cogs(self, ctx):
|
||||
"""
|
||||
Lists all loaded and available cogs.
|
||||
"""
|
||||
loaded = set(self.bot.extensions.keys())
|
||||
|
||||
all = set(await self.bot.cog_mgr.available_modules())
|
||||
|
||||
unloaded = all - loaded
|
||||
|
||||
msg = ("+ Loaded\n"
|
||||
"{}\n\n"
|
||||
"- Unloaded\n"
|
||||
"{}"
|
||||
"".format(", ".join(sorted(loaded)),
|
||||
", ".join(sorted(unloaded)))
|
||||
)
|
||||
for page in pagify(msg, [" "], shorten_by=18):
|
||||
await ctx.send(box(page.lstrip(" "), lang="diff"))
|
||||
|
||||
|
||||
@commands.group()
|
||||
@checks.is_owner()
|
||||
|
||||
Reference in New Issue
Block a user