mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Ugly workaround/hotfix for message fetching
This commit is contained in:
parent
499511f79d
commit
8da47e53e6
9 changed files with 31 additions and 14 deletions
|
@ -5,6 +5,7 @@ import { LogType } from "../../../data/LogType";
|
|||
import { isDiscordAPIError, sleep } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ReactionRolesPluginType } from "../types";
|
||||
import { hotfixMessageFetch } from "../../../utils/hotfixMessageFetch";
|
||||
|
||||
const CLEAR_ROLES_EMOJI = "❌";
|
||||
|
||||
|
@ -25,7 +26,7 @@ export async function applyReactionRoleReactionsToMessage(
|
|||
|
||||
let targetMessage;
|
||||
try {
|
||||
targetMessage = await channel.messages.fetch(messageId as Snowflake);
|
||||
targetMessage = await hotfixMessageFetch(channel, messageId as Snowflake);
|
||||
} catch (e) {
|
||||
if (isDiscordAPIError(e)) {
|
||||
if (e.code === 10008) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue