From 342b01c7f51dbe8beef1d3deb37822080ed6097f Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 1 Jan 2022 17:03:48 -0500 Subject: a few things --- src/commands/info/botInfo.ts | 3 +++ src/commands/info/color.ts | 2 ++ src/commands/info/help.ts | 3 +++ src/commands/info/links.ts | 2 ++ 4 files changed, 10 insertions(+) (limited to 'src/commands/info') diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index 56885c5..3fc3d3f 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -1,7 +1,10 @@ import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import assert from 'assert'; import { MessageEmbed, version as discordJSVersion } from 'discord.js'; import * as os from 'os'; const { default: prettyBytes } = await import('pretty-bytes'); +assert(prettyBytes); +assert(os); export default class BotInfoCommand extends BushCommand { public constructor() { diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts index 2b8ba9c..5b2c818 100644 --- a/src/commands/info/color.ts +++ b/src/commands/info/color.ts @@ -8,8 +8,10 @@ import { type BushRole, type BushSlashMessage } from '#lib'; +import assert from 'assert'; import { MessageEmbed, Role } from 'discord.js'; import tinycolor from 'tinycolor2'; +assert(tinycolor); const isValidTinyColor: BushArgumentTypeCaster = (_message, phase) => { // if the phase is a number it converts it to hex incase it could be representing a color in decimal diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index c4abf78..1ac7b3e 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,7 +1,10 @@ import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; +import assert from 'assert'; import { AutocompleteInteraction, MessageActionRow, MessageButton, MessageEmbed } from 'discord.js'; import Fuse from 'fuse.js'; import packageDotJSON from '../../../package.json' assert { type: 'json' }; +assert(Fuse); +assert(packageDotJSON); export default class HelpCommand extends BushCommand { public constructor() { diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index 79f1041..b0d2007 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -1,6 +1,8 @@ import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { assert } from 'console'; import { MessageActionRow, MessageButton } from 'discord.js'; import packageDotJSON from '../../../package.json' assert { type: 'json' }; +assert(packageDotJSON); export default class LinksCommand extends BushCommand { public constructor() { -- cgit