From 1fd8f750ed703781b92170d00f5462d258c03b1f Mon Sep 17 00:00:00 2001 From: Emily J Date: Wed, 3 Mar 2021 10:42:45 +1100 Subject: [PATCH] use json instead of yaml file for config --- bot/index.js | 3 +-- package-lock.json | 40 ++++++++++++++++++++++++++-------------- package.json | 2 +- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/bot/index.js b/bot/index.js index 8c0dbde..0514718 100644 --- a/bot/index.js +++ b/bot/index.js @@ -10,9 +10,8 @@ const Database = require('./util/database'); const Logger = require('./util/logger'); const RichEmbed = require('./util/embed'); const sentry = require('@sentry/node'); -const yaml = require('js-yaml'); const emojis = require('./assets/emojis.json'); -const config = yaml.safeLoad(require('fs').readFileSync('../botconfig.yml', 'utf8')); +const config = require('../botconfig.json'); const version = require('../package.json').version; class WoomyClient extends Eris.Client { diff --git a/package-lock.json b/package-lock.json index 5e8d8a6..bb85096 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,12 +11,12 @@ "dependencies": { "@sentry/node": "^5.27.3", "chalk": "^4.1.0", + "dayjs": "^1.10.4", "eris": "^0.14.0", "eris-pagination": "github:WeebHiroyuki/eris-pagination", "eris-reactions": "^0.1.3", "eslint": "^7.12.1", "fs-readdir-recursive": "^1.1.0", - "js-yaml": "^3.14.0", "node-fetch": "^2.6.1", "pg": "^8.4.2", "pg-format": "^1.0.4", @@ -383,6 +383,11 @@ "node": ">= 8" } }, + "node_modules/dayjs": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", + "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==" + }, "node_modules/debug": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", @@ -442,20 +447,18 @@ } }, "node_modules/eris-pagination": { - "version": "0.5.0", "resolved": "git+ssh://git@github.com/WeebHiroyuki/eris-pagination.git#7c7b56a4e6fe0d3af95f41839385b977c8f74854", - "license": "MIT", "dependencies": { "eris-reactions": "git+https://github.com/WeebHiroyuki/eris-reactions.git" - }, - "peerDependencies": { - "eris": "^0.14.0" } }, + "node_modules/eris-pagination/node_modules/eris-reactions": { + "resolved": "git+ssh://git@github.com/WeebHiroyuki/eris-reactions.git#0119ba57534ff3a96b04f956db3dc2cb4883851c" + }, "node_modules/eris-reactions": { - "version": "0.1.3", - "resolved": "git+ssh://git@github.com/WeebHiroyuki/eris-reactions.git#0119ba57534ff3a96b04f956db3dc2cb4883851c", - "license": "MIT" + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/eris-reactions/-/eris-reactions-0.1.4.tgz", + "integrity": "sha512-U2rMtfywnhh4TmqFcF7uo/ciyQN8vb9ptwSJMQs/uaY1a401f+t3sei1R3IR2gYqaFejJzgjTmzBMT6jIBPYYQ==" }, "node_modules/escape-string-regexp": { "version": "1.0.5", @@ -1119,9 +1122,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/progress": { @@ -1749,6 +1749,11 @@ "which": "^2.0.1" } }, + "dayjs": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", + "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==" + }, "debug": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", @@ -1798,11 +1803,18 @@ "from": "eris-pagination@github:WeebHiroyuki/eris-pagination", "requires": { "eris-reactions": "git+https://github.com/WeebHiroyuki/eris-reactions.git" + }, + "dependencies": { + "eris-reactions": { + "version": "git+ssh://git@github.com/WeebHiroyuki/eris-reactions.git#0119ba57534ff3a96b04f956db3dc2cb4883851c", + "from": "eris-reactions@git+https://github.com/WeebHiroyuki/eris-reactions.git" + } } }, "eris-reactions": { - "version": "git+ssh://git@github.com/WeebHiroyuki/eris-reactions.git#0119ba57534ff3a96b04f956db3dc2cb4883851c", - "from": "eris-reactions@^0.1.3" + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/eris-reactions/-/eris-reactions-0.1.4.tgz", + "integrity": "sha512-U2rMtfywnhh4TmqFcF7uo/ciyQN8vb9ptwSJMQs/uaY1a401f+t3sei1R3IR2gYqaFejJzgjTmzBMT6jIBPYYQ==" }, "escape-string-regexp": { "version": "1.0.5", diff --git a/package.json b/package.json index 2e69ab4..255f7cd 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,12 @@ "dependencies": { "@sentry/node": "^5.27.3", "chalk": "^4.1.0", + "dayjs": "^1.10.4", "eris": "^0.14.0", "eris-pagination": "github:WeebHiroyuki/eris-pagination", "eris-reactions": "^0.1.3", "eslint": "^7.12.1", "fs-readdir-recursive": "^1.1.0", - "js-yaml": "^3.14.0", "node-fetch": "^2.6.1", "pg": "^8.4.2", "pg-format": "^1.0.4",