feat: command_prefix
This commit is contained in:
@@ -10,4 +10,5 @@ module.exports = {
|
||||
telegram_token: process.env.TELEGRAM_TOEKN,
|
||||
telegram_chat_id: process.env.TELEGRAM_CHAT_ID,
|
||||
ftqq_sckey: process.env.FTQQ_SCKEY,
|
||||
command_prefix: process.env.COMMAND_PREFIX,
|
||||
};
|
||||
@@ -3,6 +3,9 @@ const config = require('../config');
|
||||
|
||||
const download = (command, callback) => {
|
||||
let retryTimes = config.retryTimes;
|
||||
if (config.command_prefix) {
|
||||
command = `${config.command_prefix} && ` + command;
|
||||
}
|
||||
const dl = () => {
|
||||
exec(command, (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user