diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-05 23:41:01 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-05 23:41:01 -0400 |
commit | c3e19b629b1d49b904782b3c21decb804ae7f1d1 (patch) | |
tree | 83ad520600cfa55f7495ea8ff88795f39472265d /src/commands/utilities | |
parent | b90149143fbd528531fbbbefbd92471414950537 (diff) | |
download | tanzanite-c3e19b629b1d49b904782b3c21decb804ae7f1d1.tar.gz tanzanite-c3e19b629b1d49b904782b3c21decb804ae7f1d1.tar.bz2 tanzanite-c3e19b629b1d49b904782b3c21decb804ae7f1d1.zip |
fix breaking changes
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/highlight-block.ts | 6 | ||||
-rw-r--r-- | src/commands/utilities/highlight-unblock.ts | 8 |
2 files changed, 7 insertions, 7 deletions
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); |