aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/icon.ts7
-rw-r--r--src/commands/info/links.ts2
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' };