From e7cc94408b2b1ac7ed0db27e75ec4f82d4fd3f09 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Wed, 29 Dec 2021 20:17:21 +0000 Subject: [PATCH] Fix some leftover type errors --- src/commands/fun/modules/eco-utils.ts | 4 ++-- src/commands/utility/react.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/commands/fun/modules/eco-utils.ts b/src/commands/fun/modules/eco-utils.ts index e798a46..fd9ddc6 100644 --- a/src/commands/fun/modules/eco-utils.ts +++ b/src/commands/fun/modules/eco-utils.ts @@ -1,6 +1,6 @@ import {pluralise} from "../../../lib"; import {Storage} from "../../../structures"; -import {User, Guild, TextChannel, DMChannel, NewsChannel, Channel, TextBasedChannel} from "discord.js"; +import {User, Guild, TextChannel, DMChannel, NewsChannel, Channel, TextBasedChannels} from "discord.js"; export const ECO_EMBED_COLOR = 0xf1c40f; @@ -89,7 +89,7 @@ export function getSendEmbed(sender: User, receiver: User, amount: number): obje }; } -export function isAuthorized(guild: Guild | null, channel: TextBasedChannel): boolean { +export function isAuthorized(guild: Guild | null, channel: TextBasedChannels): boolean { if (IS_DEV_MODE) { return true; } diff --git a/src/commands/utility/react.ts b/src/commands/utility/react.ts index 1fd7b83..bfc63e2 100644 --- a/src/commands/utility/react.ts +++ b/src/commands/utility/react.ts @@ -1,5 +1,5 @@ import {NamedCommand, RestCommand} from "onion-lasers"; -import {Message, Channel, TextChannel, TextBasedChannel} from "discord.js"; +import {Message, Channel, TextChannel, TextBasedChannels} from "discord.js"; import {processEmoteQuery} from "./modules/emote-utils"; export default new NamedCommand({ @@ -29,7 +29,7 @@ export default new NamedCommand({ const guildID = match[1]; const channelID = match[2]; const messageID = match[3]; - let tmpChannel: TextBasedChannel | undefined = channel; + let tmpChannel: TextBasedChannels | undefined = channel; if (guild?.id !== guildID) { try { @@ -40,7 +40,7 @@ export default new NamedCommand({ } if (tmpChannel?.id !== channelID) - tmpChannel = guild.channels.cache.get(channelID) as TextBasedChannel; + tmpChannel = guild.channels.cache.get(channelID) as TextBasedChannels; if (!tmpChannel) return send(`\`${channelID}\` is an invalid channel ID!`); if (message.id !== messageID) { @@ -58,10 +58,10 @@ export default new NamedCommand({ const match = copyIDPattern.exec(last)!; const channelID = match[1]; const messageID = match[2]; - let tmpChannel: TextBasedChannel | undefined = channel; + let tmpChannel: TextBasedChannels | undefined = channel; if (tmpChannel?.id !== channelID) - tmpChannel = guild?.channels.cache.get(channelID) as TextBasedChannel; + tmpChannel = guild?.channels.cache.get(channelID) as TextBasedChannels; if (!tmpChannel) return send(`\`${channelID}\` is an invalid channel ID!`); if (message.id !== messageID) {