From c486d655de34c0827ef2614733af289be5139bc3 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 18 Jul 2021 23:11:17 -0400 Subject: actually imprt fetch --- src/commands/info/botInfo.ts | 3 ++- src/commands/utilities/price.ts | 1 + src/lib/models/Global.ts | 10 +++++----- src/lib/models/Guild.ts | 10 +++++----- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src') 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 { 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 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 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 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 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 i defaultValue: '[]' }, lockdownChannels: { - type: DataTypes.STRING, + type: DataTypes.TEXT, get: function () { return JSON.parse(this.getDataValue('lockdownChannels') as unknown as string); }, -- cgit