Remove hotfixMessageFetch()

This commit is contained in:
Dragory 2021-08-20 20:01:32 +03:00
parent d54f03361a
commit 329cd05652
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
8 changed files with 8 additions and 38 deletions

View file

@ -1,23 +0,0 @@
import { GuildChannel, Message, TextChannel, ThreadChannel } from "discord.js";
import { Queue } from "../Queue";
import { sleep } from "../utils";
const queue = new Queue();
let n = 0;
export function hotfixMessageFetch(channel: TextChannel | ThreadChannel, messageId: string): Promise<Message> {
const thisN = ++n;
return channel.messages.fetch(messageId);
// // tslint:disable-next-line:no-console
// console.trace(
// `[${thisN}] Queueing to fetch message id ${messageId} from channel ${channel.id} (queue size: ${queue.length})`,
// );
// return queue.add(async () => {
// await sleep(3000);
// // tslint:disable-next-line:no-console
// console.log(`[${thisN}] Fetching message id ${messageId} from channel ${channel.id}`);
// return channel.messages.fetch(messageId);
// });
}