Right now I have a command which allows you to apply changes to the local files on my hosting server. Is there a way to make the bot send await ctx.send(...) the output of the git reset command to Discord?
Normally the output looks like this:
HEAD is now at f8dd7fe Slash Commands/Pull Feature/JSON Changes!
This is my current command:
@client.command()
@commands.has_role('Bot Manager')
async def gitpull(ctx):
typebot = config['BotType']
if typebot == "BETA":
os.system("git fetch --all")
os.system("git reset --hard origin/TestingInstance")
await ctx.send("I have attempted to *pull* the most recent changes in **TestingInstance**")
elif typebot == "STABLE":
os.system("git fetch --all")
os.system("git reset --hard origin/master")
await ctx.send("I have attempted to *pull* the most recent changes in **Master**")