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

Remove hotfixMessageFetch()

This commit is contained in:
Dragory 2021-08-20 20:01:32 +03:00
parent 0ac7969a6e
commit 80e8bab90f
8 changed files with 8 additions and 38 deletions

View file

@ -3,7 +3,6 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { isDiscordAPIError } from "../../../utils";
import { reactionRolesCmd } from "../types";
import { hotfixMessageFetch } from "../../../utils/hotfixMessageFetch";
export const ClearReactionRolesCmd = reactionRolesCmd({
trigger: "reaction_roles clear",
@ -24,7 +23,7 @@ export const ClearReactionRolesCmd = reactionRolesCmd({
let targetMessage: Message;
try {
targetMessage = await hotfixMessageFetch(args.message.channel, args.message.messageId);
targetMessage = await args.message.channel.messages.fetch(args.message.messageId);
} catch (err) {
if (isDiscordAPIError(err) && err.code === 50001) {
sendErrorMessage(pluginData, msg.channel, "Missing access to the specified message");