Update to Discord.JS v13.5.0 (OL v2.2.0)

This commit is contained in:
Alyxia Sother 2021-12-29 15:12:28 +01:00
parent 08e9ae5218
commit e7217cecb5
No known key found for this signature in database
GPG Key ID: 355968D14144B739
4 changed files with 1552 additions and 1910 deletions

3446
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
"moment": "^2.29.1", "moment": "^2.29.1",
"ms": "^2.1.3", "ms": "^2.1.3",
"node-wolfram-alpha": "^1.2.5", "node-wolfram-alpha": "^1.2.5",
"onion-lasers": "npm:onion-lasers-v13@^2.1.0", "onion-lasers": "npm:onion-lasers-v13@^2.2.0",
"pet-pet-gif": "^1.0.9", "pet-pet-gif": "^1.0.9",
"relevant-urban": "^2.0.0", "relevant-urban": "^2.0.0",
"weather-js": "^2.0.0" "weather-js": "^2.0.0"

View File

@ -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;
} }

View File

@ -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) {