aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 21:36:34 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 21:36:34 -0500
commit5481971d8dae490a467dd592ca301e72acb2254a (patch)
tree4fe3c5b5f50b8d0eda04018f8906ec806b1d9b56 /src/commands
parent83db032fb91996c926a5d007a9e5fa4abed65871 (diff)
downloadtanzanite-5481971d8dae490a467dd592ca301e72acb2254a.tar.gz
tanzanite-5481971d8dae490a467dd592ca301e72acb2254a.tar.bz2
tanzanite-5481971d8dae490a467dd592ca301e72acb2254a.zip
A bit of fixing
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() });
}
}
}