From e78beed6c7e094ef48aad5d18da01b2bbed4536c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 19 Feb 2022 18:52:41 -0500 Subject: fix: a ton of shit --- src/commands/info/icon.ts | 7 +++++-- src/commands/info/links.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/commands/info') diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts index 2b5b8fb..72e82d8 100644 --- a/src/commands/info/icon.ts +++ b/src/commands/info/icon.ts @@ -1,4 +1,5 @@ import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import assert from 'assert'; import { Embed, PermissionFlagsBits } from 'discord.js'; export default class IconCommand extends BushCommand { @@ -17,16 +18,18 @@ export default class IconCommand extends BushCommand { } public override async exec(message: BushMessage | BushSlashMessage) { + assert(message.inGuild()); + const embed = new Embed() .setTimestamp() .setColor(util.colors.default) .setImage( - message.guild!.iconURL({ + message.guild.iconURL({ size: 2048, extension: 'png' })! ) - .setTitle(util.discord.escapeMarkdown(message.guild!.name)); + .setTitle(util.discord.escapeMarkdown(message.guild.name)); await message.util.reply({ embeds: [embed] }); } } diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index 25b040c..d91f1e7 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -1,5 +1,5 @@ import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; -import { assert } from 'console'; +import assert from 'assert'; import { ActionRow, ButtonComponent, ButtonStyle } from 'discord.js'; import packageDotJSON from '../../../package.json' assert { type: 'json' }; -- cgit