Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Music & Shell Commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Glitch (cytrusbot) committed Jan 28, 2019
1 parent 92aa61d commit 132918b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion commands/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ exports.run = async (client, message, args, level) => { // eslint-disable-line n
const exec = require('child_process').exec

exec(command, (err, stdout, stderr) => {
message.author.send(stdout)
message.author.send(stdout);
message.channel.send('Command Executed In Shell.');
if (err || stderr) {
if (err) {
message.author.send('```'+err+'```');
}

if (stderr) {
message.author.send('```'+stderr+'```');
}

message.channel.send('Shell Error.');
}
})
}

Expand Down

0 comments on commit 132918b

Please sign in to comment.