README .env help

This commit is contained in:
Dragon Fire
2024-04-05 00:31:01 -04:00
parent ce3b068d4f
commit 850b148a75
4 changed files with 46 additions and 8 deletions
-5
View File
@@ -3,7 +3,6 @@ const { exec } = require('child_process');
const { promisify } = require('util');
const execAsync = promisify(exec);
const { stripIndents } = require('common-tags');
const { XIAO_GITHUB_REPO_USERNAME, XIAO_GITHUB_REPO_NAME, GITHUB_ACCESS_TOKEN } = process.env;
module.exports = class ExecCommand extends Command {
constructor(client) {
@@ -25,10 +24,6 @@ module.exports = class ExecCommand extends Command {
}
async run(msg, { command }) {
if (command === 'git pull') {
const repo = `${XIAO_GITHUB_REPO_USERNAME}/${XIAO_GITHUB_REPO_NAME}`;
command = `git pull https://${GITHUB_ACCESS_TOKEN}@github.com/${repo}.git`;
}
const results = await this.exec(command);
return msg.reply(stripIndents`
_${results.err ? 'An error occurred:' : 'Successfully executed.'}_