aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/config/config.ts2
-rw-r--r--src/commands/moderation/lockdown.ts8
2 files changed, 5 insertions, 5 deletions
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() });
}
}
}