aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.pnp.cjs27
-rw-r--r--package.json2
-rw-r--r--src/commands/info/botInfo.ts3
-rw-r--r--src/commands/utilities/price.ts1
-rw-r--r--src/lib/models/Global.ts10
-rw-r--r--src/lib/models/Guild.ts10
-rw-r--r--yarn.lock23
7 files changed, 65 insertions, 11 deletions
diff --git a/.pnp.cjs b/.pnp.cjs
index 0cf1321..1b6820c 100755
--- a/.pnp.cjs
+++ b/.pnp.cjs
@@ -41,6 +41,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@types/humanize-duration", "npm:3.25.1"],
["@types/module-alias", "npm:2.0.1"],
["@types/node", "npm:14.17.5"],
+ ["@types/node-fetch", "npm:2.5.11"],
["@types/tinycolor2", "npm:1.4.3"],
["@types/uuid", "npm:8.3.1"],
["@typescript-eslint/eslint-plugin", "virtual:d7ae587dddcefd495158f5c047acecbca3203324d75e681c7d8657c07f901f74e152f0b39978f7428d3a91daad7b5020c47ece28de69c22fcbd49d04707bf15c#npm:4.28.3"],
@@ -61,6 +62,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["madge", "npm:5.0.1"],
["module-alias", "npm:2.2.2"],
["moment", "npm:2.29.1"],
+ ["node-fetch", "npm:2.6.1"],
["pg", "virtual:d7ae587dddcefd495158f5c047acecbca3203324d75e681c7d8657c07f901f74e152f0b39978f7428d3a91daad7b5020c47ece28de69c22fcbd49d04707bf15c#npm:8.6.0"],
["pg-hstore", "npm:2.3.4"],
["prettier", "npm:2.3.2"],
@@ -409,6 +411,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD",
}]
]],
+ ["@types/node-fetch", [
+ ["npm:2.5.11", {
+ "packageLocation": "./.yarn/cache/@types-node-fetch-npm-2.5.11-8bbb0dd864-a52ee9a205.zip/node_modules/@types/node-fetch/",
+ "packageDependencies": [
+ ["@types/node-fetch", "npm:2.5.11"],
+ ["@types/node", "npm:16.3.3"],
+ ["form-data", "npm:3.0.1"]
+ ],
+ "linkType": "HARD",
+ }]
+ ]],
["@types/qs", [
["npm:6.9.7", {
"packageLocation": "./.yarn/cache/@types-qs-npm-6.9.7-4a3e6ca0d0-7fd6f9c250.zip/node_modules/@types/qs/",
@@ -936,6 +949,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@types/humanize-duration", "npm:3.25.1"],
["@types/module-alias", "npm:2.0.1"],
["@types/node", "npm:14.17.5"],
+ ["@types/node-fetch", "npm:2.5.11"],
["@types/tinycolor2", "npm:1.4.3"],
["@types/uuid", "npm:8.3.1"],
["@typescript-eslint/eslint-plugin", "virtual:d7ae587dddcefd495158f5c047acecbca3203324d75e681c7d8657c07f901f74e152f0b39978f7428d3a91daad7b5020c47ece28de69c22fcbd49d04707bf15c#npm:4.28.3"],
@@ -956,6 +970,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["madge", "npm:5.0.1"],
["module-alias", "npm:2.2.2"],
["moment", "npm:2.29.1"],
+ ["node-fetch", "npm:2.6.1"],
["pg", "virtual:d7ae587dddcefd495158f5c047acecbca3203324d75e681c7d8657c07f901f74e152f0b39978f7428d3a91daad7b5020c47ece28de69c22fcbd49d04707bf15c#npm:8.6.0"],
["pg-hstore", "npm:2.3.4"],
["prettier", "npm:2.3.2"],
@@ -1928,6 +1943,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD",
}]
]],
+ ["form-data", [
+ ["npm:3.0.1", {
+ "packageLocation": "./.yarn/cache/form-data-npm-3.0.1-d080d436e0-b019e8d35c.zip/node_modules/form-data/",
+ "packageDependencies": [
+ ["form-data", "npm:3.0.1"],
+ ["asynckit", "npm:0.4.0"],
+ ["combined-stream", "npm:1.0.8"],
+ ["mime-types", "npm:2.1.31"]
+ ],
+ "linkType": "HARD",
+ }]
+ ]],
["fs.realpath", [
["npm:1.0.0", {
"packageLocation": "./.yarn/cache/fs.realpath-npm-1.0.0-c8f05d8126-99ddea01a7.zip/node_modules/fs.realpath/",
diff --git a/package.json b/package.json
index 2a4b4a1..165e982 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"@types/humanize-duration": "^3",
"@types/module-alias": "^2",
"@types/node": "^14.14.22",
+ "@types/node-fetch": "^2",
"@types/tinycolor2": "^1",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^4.14.1",
@@ -54,6 +55,7 @@
"madge": "^5.0.1",
"module-alias": "^2.2.2",
"moment": "^2.29.1",
+ "node-fetch": "^2.6.1",
"pg": "^8.5.1",
"pg-hstore": "^2.3.3",
"sequelize": "^6.5.0",
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index 986bd01..2add1ac 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -20,7 +20,8 @@ export default class BotInfoCommand extends BushCommand {
public async exec(message: BushMessage | BushSlashMessage): Promise<void> {
const developers = (await this.client.util.mapIDs(this.client.config.owners)).map((u) => u?.tag).join('\n');
const currentCommit = (await this.client.util.shell('git rev-parse HEAD')).stdout.replace('\n', '');
- const repoUrl = (await this.client.util.shell('git remote get-url origin')).stdout.replace('\n', '');
+ let repoUrl = (await this.client.util.shell('git remote get-url origin')).stdout.replace('\n', '');
+ repoUrl = repoUrl.substring(0, repoUrl.length-4)
const embed = new MessageEmbed()
.setTitle('Bot Info:')
.addField('**Uptime**', this.client.util.humanizeDuration(this.client.uptime), true)
diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts
index a8cf127..21781d1 100644
--- a/src/commands/utilities/price.ts
+++ b/src/commands/utilities/price.ts
@@ -1,6 +1,7 @@
import { Constants } from 'discord-akairo';
import { ColorResolvable, MessageEmbed } from 'discord.js';
import Fuse from 'fuse.js';
+import fetch from 'node-fetch';
import { BushCommand, BushMessage } from '../../lib';
interface Summary {
diff --git a/src/lib/models/Global.ts b/src/lib/models/Global.ts
index ee9f43c..e37ef2b 100644
--- a/src/lib/models/Global.ts
+++ b/src/lib/models/Global.ts
@@ -53,7 +53,7 @@ export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes
primaryKey: true
},
superUsers: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('superUsers') as unknown as string);
},
@@ -64,7 +64,7 @@ export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes
defaultValue: '[]'
},
disabledCommands: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('disabledCommands') as unknown as string);
},
@@ -75,7 +75,7 @@ export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes
defaultValue: '[]'
},
blacklistedUsers: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('blacklistedUsers') as unknown as string);
},
@@ -86,7 +86,7 @@ export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes
defaultValue: '[]'
},
blacklistedGuilds: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('blacklistedGuilds') as unknown as string);
},
@@ -97,7 +97,7 @@ export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes
defaultValue: '[]'
},
blacklistedChannels: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('blacklistedChannels') as unknown as string);
},
diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts
index 30072b3..050b4c7 100644
--- a/src/lib/models/Guild.ts
+++ b/src/lib/models/Guild.ts
@@ -54,7 +54,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
defaultValue: client.config.prefix
},
autoPublishChannels: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('autoPublishChannels') as unknown as string);
},
@@ -65,7 +65,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
defaultValue: '[]'
},
blacklistedChannels: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('blacklistedChannels') as unknown as string);
},
@@ -76,7 +76,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
defaultValue: '[]'
},
blacklistedUsers: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('blacklistedUsers') as unknown as string);
},
@@ -99,7 +99,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
allowNull: true
},
disabledCommands: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('disabledCommands') as unknown as string);
},
@@ -110,7 +110,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
defaultValue: '[]'
},
lockdownChannels: {
- type: DataTypes.STRING,
+ type: DataTypes.TEXT,
get: function () {
return JSON.parse(this.getDataValue('lockdownChannels') as unknown as string);
},
diff --git a/yarn.lock b/yarn.lock
index 34e5008..8c64bb8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -282,6 +282,16 @@ __metadata:
languageName: node
linkType: hard
+"@types/node-fetch@npm:^2":
+ version: 2.5.11
+ resolution: "@types/node-fetch@npm:2.5.11"
+ dependencies:
+ "@types/node": "*"
+ form-data: ^3.0.0
+ checksum: a52ee9a205ce3130404a1c8eb0a163aa013fb94c5c93150735dda55bd4d21a556713834b11f6f031721ad7c82d9d7f77d45436010cefc11e851f518dfeeaca3e
+ languageName: node
+ linkType: hard
+
"@types/node@npm:*":
version: 16.3.3
resolution: "@types/node@npm:16.3.3"
@@ -681,6 +691,7 @@ __metadata:
"@types/humanize-duration": ^3
"@types/module-alias": ^2
"@types/node": ^14.14.22
+ "@types/node-fetch": ^2
"@types/tinycolor2": ^1
"@types/uuid": ^8.3.0
"@typescript-eslint/eslint-plugin": ^4.14.1
@@ -701,6 +712,7 @@ __metadata:
madge: ^5.0.1
module-alias: ^2.2.2
moment: ^2.29.1
+ node-fetch: ^2.6.1
pg: ^8.5.1
pg-hstore: ^2.3.3
prettier: ^2.3.2
@@ -1549,6 +1561,17 @@ discord.js@NotEnoughUpdates/discord.js:
languageName: node
linkType: hard
+"form-data@npm:^3.0.0":
+ version: 3.0.1
+ resolution: "form-data@npm:3.0.1"
+ dependencies:
+ asynckit: ^0.4.0
+ combined-stream: ^1.0.8
+ mime-types: ^2.1.12
+ checksum: b019e8d35c8afc14a2bd8a7a92fa4f525a4726b6d5a9740e8d2623c30e308fbb58dc8469f90415a856698933c8479b01646a9dff33c87cc4e76d72aedbbf860d
+ languageName: node
+ linkType: hard
+
"fs.realpath@npm:^1.0.0":
version: 1.0.0
resolution: "fs.realpath@npm:1.0.0"