mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Add pip install command (#1354)
This commit is contained in:
parent
10cbd4d3c4
commit
fdd61963e6
@ -185,6 +185,20 @@ class Downloader:
|
||||
elif target.is_file():
|
||||
os.remove(str(target))
|
||||
|
||||
@commands.command()
|
||||
@checks.is_owner()
|
||||
async def pipinstall(self, ctx, *deps: str):
|
||||
"""
|
||||
Installs a group of dependencies using pip.
|
||||
"""
|
||||
repo = Repo("", "", "", Path.cwd(), loop=ctx.bot.loop)
|
||||
success = await repo.install_raw_requirements(deps, self.SHAREDLIB_PATH)
|
||||
|
||||
if success:
|
||||
await ctx.send(_("Libraries installed."))
|
||||
else:
|
||||
await ctx.send(_("Some libraries failed to install. Please check"
|
||||
" your logs for a complete list."))
|
||||
|
||||
@commands.group()
|
||||
@checks.is_owner()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user