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
|
@ -1,6 +1,7 @@
|
|||
import { Message, Snowflake, TextChannel, ThreadChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { MessageSaverPluginType } from "./types";
|
||||
import { hotfixMessageFetch } from "../../utils/hotfixMessageFetch";
|
||||
|
||||
export async function saveMessagesToDB(
|
||||
pluginData: GuildPluginData<MessageSaverPluginType>,
|
||||
|
@ -15,7 +16,7 @@ export async function saveMessagesToDB(
|
|||
let thisMsg: Message;
|
||||
|
||||
try {
|
||||
thisMsg = await channel.messages.fetch(id as Snowflake);
|
||||
thisMsg = await hotfixMessageFetch(channel, id as Snowflake);
|
||||
|
||||
if (!thisMsg) {
|
||||
failed.push(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue