mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Add REST request/429 debugging, temporarily disable message fetch hotfix
This commit is contained in:
parent
53fea6b88c
commit
187e8235be
3 changed files with 36 additions and 12 deletions
|
@ -8,14 +8,16 @@ let n = 0;
|
|||
export function hotfixMessageFetch(channel: TextChannel | ThreadChannel, messageId: string): Promise<Message> {
|
||||
const thisN = ++n;
|
||||
|
||||
// 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);
|
||||
});
|
||||
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);
|
||||
// });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue