I was wondering if I can get my bot to start an application on my computer? if i use a command like
if (message.content === 'grimm!start-minecraft')
is there a way to start an .exe file from a command?
I was wondering if I can get my bot to start an application on my computer? if i use a command like
if (message.content === 'grimm!start-minecraft')
is there a way to start an .exe file from a command?
You can use this code to run any .exe
but it'll run that file on the pc you're hosting the bot on. Not the client's computer (That'd be weird)
const exec = require('child_process').execFile;
var runExe =fileName => {
exec( fileName , function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runExe();
Also check this out