mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[V3 Downloader] Pagify cog list and typing fix (#1662)
* Cog list is now pagified * Proper typing of Tuple * Black formatting * More Black formatting
This commit is contained in:
parent
706b04610d
commit
4028dd3009
@ -371,7 +371,8 @@ class Downloader:
|
|||||||
["+ {}: {}".format(c.name, c.short or "") for c in cogs]
|
["+ {}: {}".format(c.name, c.short or "") for c in cogs]
|
||||||
)
|
)
|
||||||
|
|
||||||
await ctx.send(box(cogs, lang="diff"))
|
for page in pagify(cogs, ["\n"], shorten_by=16):
|
||||||
|
await ctx.send(box(page.lstrip(" "), lang="diff"))
|
||||||
|
|
||||||
@cog.command(name="info")
|
@cog.command(name="info")
|
||||||
async def _cog_info(self, ctx, repo_name: Repo, cog_name: str):
|
async def _cog_info(self, ctx, repo_name: Repo, cog_name: str):
|
||||||
@ -388,7 +389,9 @@ class Downloader:
|
|||||||
msg = _("Information on {}:\n{}").format(cog.name, cog.description or "")
|
msg = _("Information on {}:\n{}").format(cog.name, cog.description or "")
|
||||||
await ctx.send(box(msg))
|
await ctx.send(box(msg))
|
||||||
|
|
||||||
async def is_installed(self, cog_name: str) -> (bool, Union[Installable, None]):
|
async def is_installed(
|
||||||
|
self, cog_name: str
|
||||||
|
) -> Union[Tuple[bool, Installable], Tuple[bool, None]]:
|
||||||
"""Check to see if a cog has been installed through Downloader.
|
"""Check to see if a cog has been installed through Downloader.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user