aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/config/config.ts10
-rw-r--r--src/commands/dev/eval.ts3
-rw-r--r--src/commands/utilities/highlight-block.ts6
-rw-r--r--src/commands/utilities/highlight-unblock.ts8
4 files changed, 13 insertions, 14 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index cbfc5f7..f2b4284 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -20,9 +20,9 @@ import { type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo';
import {
ActionRowBuilder,
ApplicationCommandOptionType,
+ BaseChannel,
ButtonBuilder,
ButtonStyle,
- Channel,
EmbedBuilder,
Formatters,
GuildMember,
@@ -30,7 +30,7 @@ import {
PermissionFlagsBits,
Role,
SelectMenuBuilder,
- UnsafeSelectMenuOptionBuilder,
+ SelectMenuOptionBuilder,
User,
type Message,
type MessageComponentInteraction,
@@ -235,8 +235,8 @@ export default class ConfigCommand extends BushCommand {
const messageOptions = await this.generateMessageOptions(message, setting ?? undefined);
msg = (await message.util.reply(messageOptions)) as Message;
} else {
- const parseVal = (val: string | Channel | Role | User | GuildMember) => {
- if (val instanceof Channel || val instanceof Role || val instanceof User || val instanceof GuildMember) {
+ const parseVal = (val: string | BaseChannel | Role | User | GuildMember) => {
+ if (val instanceof BaseChannel || val instanceof Role || val instanceof User || val instanceof GuildMember) {
return val.id;
}
return val;
@@ -324,7 +324,7 @@ export default class ConfigCommand extends BushCommand {
new SelectMenuBuilder()
.addOptions(
settingsArr.map((s) =>
- new UnsafeSelectMenuOptionBuilder()
+ new SelectMenuOptionBuilder()
.setLabel(guildSettingsObj[s].name)
.setValue(s)
.setDescription(guildSettingsObj[s].description)
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index a4a52b5..a317e00 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -37,7 +37,6 @@ import {
Embed,
EmbedBuilder,
Emoji,
- Interaction,
InteractionCollector,
Message,
MessageCollector,
@@ -59,7 +58,7 @@ const { transpile } = ts,
/* eslint-enable @typescript-eslint/no-unused-vars */
// prettier-ignore
-assertAll(ActivePunishment, BushCommand, Global, Guild, Level, ModLog, Shared, StickyRole, Snowflake_, Canvas, exec, ActionRow, ButtonComponent, ButtonInteraction, Collection, Collector, CommandInteraction, ContextMenuCommandInteraction, DMChannel, Embed, Emoji, Interaction, InteractionCollector, Message, Attachment, MessageCollector, OAuth2Scopes, PermissionFlagsBits, PermissionsBitField, ReactionCollector, SelectMenuComponent, path, ts, fileURLToPath, promisify, assert, got, transpile, sh, SnowflakeUtil, __dirname);
+assertAll(ActivePunishment, BushCommand, Global, Guild, Level, ModLog, Shared, StickyRole, Snowflake_, Canvas, exec, ActionRow, ButtonComponent, ButtonInteraction, Collection, Collector, CommandInteraction, ContextMenuCommandInteraction, DMChannel, Embed, Emoji, InteractionCollector, Message, Attachment, MessageCollector, OAuth2Scopes, PermissionFlagsBits, PermissionsBitField, ReactionCollector, SelectMenuComponent, path, ts, fileURLToPath, promisify, assert, got, transpile, sh, SnowflakeUtil, __dirname);
export default class EvalCommand extends BushCommand {
public constructor() {
diff --git a/src/commands/utilities/highlight-block.ts b/src/commands/utilities/highlight-block.ts
index 7843836..0240da4 100644
--- a/src/commands/utilities/highlight-block.ts
+++ b/src/commands/utilities/highlight-block.ts
@@ -1,7 +1,7 @@
import { AllowedMentions, BushCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib';
import assert from 'assert/strict';
import { Argument, ArgumentGeneratorReturn } from 'discord-akairo';
-import { Channel, GuildMember, User } from 'discord.js';
+import { BaseChannel, GuildMember, User } from 'discord.js';
import { BlockResult } from '../../lib/common/HighlightManager.js';
import { highlightSubcommands } from './highlight-!.js';
@@ -40,10 +40,10 @@ export default class HighlightBlockCommand extends BushCommand {
if (!args.target) return message.util.reply(`${emojis.error} Could not resolve member.`);
- if (!args.target || !(args.target instanceof GuildMember || args.target instanceof Channel))
+ if (!args.target || !(args.target instanceof GuildMember || args.target instanceof BaseChannel))
return await message.util.reply(`${emojis.error} You can only block users or channels.`);
- if (args.target instanceof Channel && !args.target.isTextBased())
+ if (args.target instanceof BaseChannel && !args.target.isTextBased())
return await message.util.reply(`${emojis.error} You can only block text-based channels.`);
const res = await this.client.highlightManager.addBlock(message.guildId, message.author.id, args.target);
diff --git a/src/commands/utilities/highlight-unblock.ts b/src/commands/utilities/highlight-unblock.ts
index d731205..2e9dd73 100644
--- a/src/commands/utilities/highlight-unblock.ts
+++ b/src/commands/utilities/highlight-unblock.ts
@@ -1,7 +1,7 @@
import { AllowedMentions, BushCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib';
-import assert from 'assert/strict';
+import assert from 'assert';
import { Argument, ArgumentGeneratorReturn } from 'discord-akairo';
-import { Channel, GuildMember, User } from 'discord.js';
+import { BaseChannel, GuildMember, User } from 'discord.js';
import { UnblockResult } from '../../lib/common/HighlightManager.js';
import { highlightSubcommands } from './highlight-!.js';
@@ -40,10 +40,10 @@ export default class HighlightUnblockCommand extends BushCommand {
if (!args.target) return message.util.reply(`${emojis.error} Could not resolve member.`);
- if (!(args.target instanceof GuildMember || args.target instanceof Channel))
+ if (!(args.target instanceof GuildMember || args.target instanceof BaseChannel))
return await message.util.reply(`${emojis.error} You can only unblock users or channels.`);
- if (args.target instanceof Channel && !args.target.isTextBased())
+ if (args.target instanceof BaseChannel && !args.target.isTextBased())
return await message.util.reply(`${emojis.error} You can only unblock text-based channels.`);
const res = await this.client.highlightManager.removeBlock(message.guildId, message.author.id, args.target);