mirror of
https://github.com/keanuplayz/TravBot-v3.git
synced 2024-08-15 02:33:12 +00:00
revert: Fix some leftover type errors
This commit is contained in:
parent
3170d85376
commit
5fc65e3c71
3 changed files with 1637 additions and 1220 deletions
2843
package-lock.json
generated
2843
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
import {pluralise} from "../../../lib";
|
import {pluralise} from "../../../lib";
|
||||||
import {Storage} from "../../../structures";
|
import {Storage} from "../../../structures";
|
||||||
import {User, Guild, TextChannel, DMChannel, NewsChannel, Channel, TextBasedChannels} from "discord.js";
|
import {User, Guild, TextChannel, DMChannel, NewsChannel, Channel, TextBasedChannel} from "discord.js";
|
||||||
|
|
||||||
export const ECO_EMBED_COLOR = 0xf1c40f;
|
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: TextBasedChannels): boolean {
|
export function isAuthorized(guild: Guild | null, channel: TextBasedChannel): boolean {
|
||||||
if (IS_DEV_MODE) {
|
if (IS_DEV_MODE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {NamedCommand, RestCommand} from "onion-lasers";
|
import {NamedCommand, RestCommand} from "onion-lasers";
|
||||||
import {Message, Channel, TextChannel, TextBasedChannels} from "discord.js";
|
import {Message, Channel, TextChannel, TextBasedChannel} from "discord.js";
|
||||||
import {processEmoteQuery} from "./modules/emote-utils";
|
import {processEmoteQuery} from "./modules/emote-utils";
|
||||||
|
|
||||||
export default new NamedCommand({
|
export default new NamedCommand({
|
||||||
|
@ -29,7 +29,7 @@ export default new NamedCommand({
|
||||||
const guildID = match[1];
|
const guildID = match[1];
|
||||||
const channelID = match[2];
|
const channelID = match[2];
|
||||||
const messageID = match[3];
|
const messageID = match[3];
|
||||||
let tmpChannel: TextBasedChannels | undefined = channel;
|
let tmpChannel: TextBasedChannel | undefined = channel;
|
||||||
|
|
||||||
if (guild?.id !== guildID) {
|
if (guild?.id !== guildID) {
|
||||||
try {
|
try {
|
||||||
|
@ -40,7 +40,7 @@ export default new NamedCommand({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmpChannel?.id !== channelID)
|
if (tmpChannel?.id !== channelID)
|
||||||
tmpChannel = guild.channels.cache.get(channelID) as TextBasedChannels;
|
tmpChannel = guild.channels.cache.get(channelID) as TextBasedChannel;
|
||||||
if (!tmpChannel) return send(`\`${channelID}\` is an invalid channel ID!`);
|
if (!tmpChannel) return send(`\`${channelID}\` is an invalid channel ID!`);
|
||||||
|
|
||||||
if (message.id !== messageID) {
|
if (message.id !== messageID) {
|
||||||
|
@ -58,10 +58,10 @@ export default new NamedCommand({
|
||||||
const match = copyIDPattern.exec(last)!;
|
const match = copyIDPattern.exec(last)!;
|
||||||
const channelID = match[1];
|
const channelID = match[1];
|
||||||
const messageID = match[2];
|
const messageID = match[2];
|
||||||
let tmpChannel: TextBasedChannels | undefined = channel;
|
let tmpChannel: TextBasedChannel | undefined = channel;
|
||||||
|
|
||||||
if (tmpChannel?.id !== channelID)
|
if (tmpChannel?.id !== channelID)
|
||||||
tmpChannel = guild?.channels.cache.get(channelID) as TextBasedChannels;
|
tmpChannel = guild?.channels.cache.get(channelID) as TextBasedChannel;
|
||||||
if (!tmpChannel) return send(`\`${channelID}\` is an invalid channel ID!`);
|
if (!tmpChannel) return send(`\`${channelID}\` is an invalid channel ID!`);
|
||||||
|
|
||||||
if (message.id !== messageID) {
|
if (message.id !== messageID) {
|
||||||
|
|
Loading…
Reference in a new issue