diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-18 23:11:17 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-18 23:11:17 -0400 |
commit | c486d655de34c0827ef2614733af289be5139bc3 (patch) | |
tree | c7622d018b6436777da74823bfb7a9cd672d73f9 /src | |
parent | b754bdd64bf09a6b9af9d30cca8e68ad7888355f (diff) | |
download | tanzanite-c486d655de34c0827ef2614733af289be5139bc3.tar.gz tanzanite-c486d655de34c0827ef2614733af289be5139bc3.tar.bz2 tanzanite-c486d655de34c0827ef2614733af289be5139bc3.zip |
actually imprt fetch
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/info/botInfo.ts | 3 | ||||
-rw-r--r-- | src/commands/utilities/price.ts | 1 | ||||
-rw-r--r-- | src/lib/models/Global.ts | 10 | ||||
-rw-r--r-- | src/lib/models/Guild.ts | 10 |
4 files changed, 13 insertions, 11 deletions
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); }, |