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:
parent
0de53d1fb4
commit
31d3e2b1d7
9 changed files with 33 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue