| author | |
| committer | |
| log | e14da9165e20006bea6e64e6f4a716e8ab610d0f |
| tree | 9e4da0ebe0449454b324255471e13b9bf4752e37 |
| parent | 854fefe396967bd053f7e2fc196970be12c3d522 |
| signature |
4 files changed, 17 insertions(+), 1 deletions(-)
.gitignore+1| ... | @@ -1,2 +1,3 @@ | ... | @@ -1,2 +1,3 @@ |
| 1 | token | 1 | token |
| 2 | .env | ||
| 2 | node_modules | 3 | node_modules |
index.js+10-1| ... | @@ -1,3 +1,5 @@ | ... | @@ -1,3 +1,5 @@ |
| 1 | require('dotenv').config(); | ||
| 2 | |||
| 1 | const Discord = require('discord.js'); | 3 | const Discord = require('discord.js'); |
| 2 | const fs = require('fs'); | 4 | const fs = require('fs'); |
| 3 | const Color = require('color'); | 5 | const Color = require('color'); |
| ... | @@ -202,4 +204,11 @@ Created by dave caruso, <https://davecode.me>, support \`dave@davecode.me\``); | ... | @@ -202,4 +204,11 @@ Created by dave caruso, <https://davecode.me>, support \`dave@davecode.me\``); |
| 202 | updateClientStatus(); | 204 | updateClientStatus(); |
| 203 | }); | 205 | }); |
| 204 | 206 | ||
| 205 | client.login(fs.readFileSync(__dirname + '/token').toString().replace(/ |\n/g,'')); | 207 | client.login(process.env.TOKEN); |
| 208 | |||
| 209 | if (process.env.HEALTHCHECKS_URL) { | ||
| 210 | var https = require('https'); | ||
| 211 | setInterval(() => { | ||
| 212 | https.get(process.env.HEALTHCHECKS_URL).on('error', () => {}); | ||
| 213 | }, 5 * 60 * 1000); | ||
| 214 | } | ||
| \ No newline at end of file | |||
package.json+1| ... | @@ -11,6 +11,7 @@ | ... | @@ -11,6 +11,7 @@ |
| 11 | "dependencies": { | 11 | "dependencies": { |
| 12 | "color": "^3.1.2", | 12 | "color": "^3.1.2", |
| 13 | "discord.js": "^13.0.0-dev.4d53d0f.1626566655", | 13 | "discord.js": "^13.0.0-dev.4d53d0f.1626566655", |
| 14 | "dotenv": "^10.0.0", | ||
| 14 | "long": "^4.0.0", | 15 | "long": "^4.0.0", |
| 15 | "node-cache": "^5.1.2" | 16 | "node-cache": "^5.1.2" |
| 16 | } | 17 | } |
yarn.lock+5| ... | @@ -123,6 +123,11 @@ discord.js@^13.0.0-dev.4d53d0f.1626566655: | ... | @@ -123,6 +123,11 @@ discord.js@^13.0.0-dev.4d53d0f.1626566655: |
| 123 | node-fetch "^2.6.1" | 123 | node-fetch "^2.6.1" |
| 124 | ws "^7.5.1" | 124 | ws "^7.5.1" |
| 125 | 125 | ||
| 126 | dotenv@^10.0.0: | ||
| 127 | version "10.0.0" | ||
| 128 | resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" | ||
| 129 | integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== | ||
| 130 | |||
| 126 | event-target-shim@^5.0.0: | 131 | event-target-shim@^5.0.0: |
| 127 | version "5.0.1" | 132 | version "5.0.1" |
| 128 | resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" | 133 | resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" |