diff --git a/commands/ping.js b/commands/ping.js index 848eb4d..6e23a0c 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -1,7 +1,7 @@ module.exports = { - name: 'ping', // Keep it to one word + name: 'ping', description: 'Just ping.', - execute({message, client}) { //parameters you can use for netload: message, args, client, prefix + execute({message, client}) { message.channel.send(`Pong.\n${client.ws.ping}ms`) } }; \ No newline at end of file diff --git a/commands/update.js b/commands/update.js new file mode 100644 index 0000000..0fef233 --- /dev/null +++ b/commands/update.js @@ -0,0 +1,18 @@ +module.exports = { + name: 'update', + description: 'pull changes from master and reload commands', + admin: true, + execute({message}) { + let cmd = "git pull"; + const exec = require("child_process").exec; + + exec(cmd, (err, stdout, stderr) => { + process.stdout.write(stdout); + if (err) { + message.channel.send("Something went wrong..."); + console.log(stderr); + } + }); + + } +}; \ No newline at end of file