3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Another potential fix for Node.js 13/14 incompatibility

This commit is contained in:
Dragory 2020-05-08 18:29:17 +03:00
parent 0de53d1fb4
commit 31d3e2b1d7
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
9 changed files with 33 additions and 31 deletions

View file

@ -2,6 +2,7 @@ import { configUtils, IBasePluginConfig, IPluginOptions, logger, Plugin } from "
import * as t from "io-ts";
import {
deepKeyIntersect,
isDiscordRESTError,
isSnowflake,
isUnicodeEmoji,
MINUTES,
@ -16,7 +17,6 @@ import {
UnknownUser,
} from "../utils";
import { Invite, Member, User } from "eris";
import DiscordRESTError = require("eris/lib/errors/DiscordRESTError.js"); // tslint:disable-line
import { performance } from "perf_hooks";
import { decodeAndValidateStrict, StrictValidationError, validate } from "../validatorUtils";
import { SimpleCache } from "../SimpleCache";
@ -270,7 +270,7 @@ export class ZeppelinPlugin<
try {
member = userId && (await this.bot.getRESTGuildMember(this.guild.id, userId));
} catch (e) {
if (!(e instanceof DiscordRESTError)) {
if (!isDiscordRESTError(e)) {
throw e;
}
}