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

Change DiscordRESTError to DiscordAPIError

This commit is contained in:
Dark 2021-06-30 23:06:02 +02:00
parent bbf52a5951
commit 6e2bd28691
18 changed files with 50 additions and 50 deletions

View file

@ -1,7 +1,7 @@
import { Message, Snowflake } from "discord.js";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { isDiscordRESTError } from "../../../utils";
import { isDiscordAPIError } from "../../../utils";
import { reactionRolesCmd } from "../types";
export const ClearReactionRolesCmd = reactionRolesCmd({
@ -25,7 +25,7 @@ export const ClearReactionRolesCmd = reactionRolesCmd({
try {
targetMessage = await args.message.channel.messages.fetch(args.message.messageId as Snowflake);
} catch (err) {
if (isDiscordRESTError(err) && err.code === 50001) {
if (isDiscordAPIError(err) && err.code === 50001) {
sendErrorMessage(pluginData, msg.channel, "Missing access to the specified message");
return;
}