mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
++debug
This commit is contained in:
parent
86ccae016b
commit
cc9aaf235e
1 changed files with 6 additions and 1 deletions
|
@ -3,12 +3,17 @@ 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;
|
||||
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(`[${thisN}] Queueing to fetch message id ${messageId} from channel ${channel.id}`);
|
||||
return queue.add(async () => {
|
||||
await sleep(3000);
|
||||
// tslint:disable-next-line:no-console
|
||||
console.trace(`Fetching message id ${messageId} from channel ${channel.id}`);
|
||||
console.trace(`[${thisN}] Fetching message id ${messageId} from channel ${channel.id}`);
|
||||
return channel.messages.fetch(messageId);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue