From 5481971d8dae490a467dd592ca301e72acb2254a Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 30 Dec 2021 21:36:34 -0500 Subject: A bit of fixing --- src/commands/config/config.ts | 2 +- src/commands/moderation/lockdown.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/commands') diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 87397ee..1251f1f 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -320,7 +320,7 @@ export default class SettingsCommand extends BushCommand { } } - assert(typeof feat === 'string', `feat is not a string: ${util.inspect(feat)}`); + assert(typeof feat === 'string' || Array.isArray(feat), `feat is not a string: ${util.inspect(feat)}`); return Array.isArray(feat) ? feat.length diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts index ae9a62b..87a2f05 100644 --- a/src/commands/moderation/lockdown.ts +++ b/src/commands/moderation/lockdown.ts @@ -79,6 +79,7 @@ export default class LockdownCommand extends BushCommand { action: 'lockdown' | 'unlockdown' ) { assert(message.inGuild()); + if (message.util.isSlashMessage(message)) await message.interaction.deferReply(); if (args.channel && args.all) return await message.util.reply(`${util.emojis.error} You can't specify a channel and set all to true at the same time.`); @@ -94,10 +95,9 @@ export default class LockdownCommand extends BushCommand { const confirmation = await ConfirmationPrompt.send(message, { content: `Are you sure you want to ${action} all channels?` }); - if (!confirmation) return message.util.send(`${util.emojis.error} Lockdown cancelled.`); + if (!confirmation) return message.util.sendNew(`${util.emojis.error} Lockdown cancelled.`); } - client.console.debug('right before lockdown'); const response = await message.guild.lockdown({ moderator: message.author, channel: channel ?? undefined, @@ -107,7 +107,7 @@ export default class LockdownCommand extends BushCommand { }); if (response instanceof Collection) { - return await message.util.send({ + return await message.util.sendNew({ content: `${util.emojis.error} The following channels failed to ${action}:`, embeds: [ { @@ -138,7 +138,7 @@ export default class LockdownCommand extends BushCommand { } assert(messageResponse); - return await message.util.send({ content: messageResponse, allowedMentions: AllowedMentions.none() }); + return await message.util.sendNew({ content: messageResponse, allowedMentions: AllowedMentions.none() }); } } } -- cgit