diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-19 18:52:41 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-19 18:52:41 -0500 |
commit | e78beed6c7e094ef48aad5d18da01b2bbed4536c (patch) | |
tree | 32676793af5f7bdc39d438ff284fa5b959274e96 /src/commands/info | |
parent | a3103b629250de3fb97a40a4f9ff7e7ba28f4d16 (diff) | |
download | tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.tar.gz tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.tar.bz2 tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.zip |
fix: a ton of shit
Diffstat (limited to 'src/commands/info')
-rw-r--r-- | src/commands/info/icon.ts | 7 | ||||
-rw-r--r-- | src/commands/info/links.ts | 2 |
2 files changed, 6 insertions, 3 deletions
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' }; |