mirror of
https://github.com/keanuplayz/TravBot-v3.git
synced 2024-08-15 02:33:12 +00:00
Fix some leftover type errors
This commit is contained in:
parent
e7217cecb5
commit
e7cc94408b
2 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue