mirror of https://github.com/coddrago/Heroku
added a pip command.
parent
487e6cc4f1
commit
32afe153f8
|
@ -39,7 +39,6 @@ logger = logging.getLogger(__name__)
|
||||||
def hash_msg(message):
|
def hash_msg(message):
|
||||||
return f"{str(utils.get_chat_id(message))}/{str(message.id)}"
|
return f"{str(utils.get_chat_id(message))}/{str(message.id)}"
|
||||||
|
|
||||||
|
|
||||||
async def read_stream(func: callable, stream, delay: float):
|
async def read_stream(func: callable, stream, delay: float):
|
||||||
last_task = None
|
last_task = None
|
||||||
data = b""
|
data = b""
|
||||||
|
@ -313,6 +312,14 @@ class TerminalMod(loader.Module):
|
||||||
@loader.command()
|
@loader.command()
|
||||||
async def terminalcmd(self, message):
|
async def terminalcmd(self, message):
|
||||||
await self.run_command(message, utils.get_args_raw(message))
|
await self.run_command(message, utils.get_args_raw(message))
|
||||||
|
|
||||||
|
@loader.command()
|
||||||
|
async def pipcmd(self, message):
|
||||||
|
await self.run_command(
|
||||||
|
message,
|
||||||
|
("pip " if os.geteuid() == 0 else "sudo -S apt ")
|
||||||
|
+ utils.get_args_raw(message)
|
||||||
|
)
|
||||||
|
|
||||||
@loader.command()
|
@loader.command()
|
||||||
async def aptcmd(self, message):
|
async def aptcmd(self, message):
|
||||||
|
|
Loading…
Reference in New Issue