From e5ddb61f4c1e767fcda3e0338d6d76718a29d089 Mon Sep 17 00:00:00 2001 From: connorhsm Date: Sun, 24 Jul 2022 22:06:18 +1000 Subject: [PATCH] Update deploy command script to api v10 --- README.md | 13 +++++++++++-- deploy-commands.js | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8436620..a2fa92d 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,18 @@ Run latest dev image Deploy commands `export DEV/PROD_TOKEN=thetoken` -`export GUILDID=id` -`export CLIENTID=id` +`export GUILDID=id` (Defaults to dev token if unset) +`export CLIENTID=id` (Defaults to dev token if unset) `node deploy-commands.js` Webhook `webhook -hooks /var/webhook/hooks.json -verbose -port 9000 -hotreload` + +Use correct node version +`nvm use (version)` *Always check the Dockerfile for the current version of Node this project is developed against.* + +Update packages +`npm update` + +Better way to update packages (Will tell you about any new versions, including major) +`npx npm-check-updates` provide `-u` for the program to update them itself \ No newline at end of file diff --git a/deploy-commands.js b/deploy-commands.js index a312bb9..d0a3319 100644 --- a/deploy-commands.js +++ b/deploy-commands.js @@ -32,7 +32,7 @@ for (const file of commandFiles) { commands.push(command.data.toJSON()); }; -const rest = new REST({ version: '9' }).setToken(process.env.DEV_TOKEN ? process.env.DEV_TOKEN : process.env.PROD_TOKEN); +const rest = new REST({ version: '10' }).setToken(process.env.DEV_TOKEN ? process.env.DEV_TOKEN : process.env.PROD_TOKEN); (async () => { try {