refactor(Util): replace Util.delayFor with tp.setTimeout (#7082)

This commit is contained in:
Antonio Román
2021-12-08 21:31:01 +01:00
committed by GitHub
parent 23513d1917
commit 25b8491235
6 changed files with 11 additions and 22 deletions

View File

@@ -587,18 +587,6 @@ class Util extends null {
return text.replaceAll('```', '`\u200b``');
}
/**
* Creates a Promise that resolves after a specified duration.
* @param {number} ms How long to wait before resolving (in milliseconds)
* @returns {Promise<void>}
* @private
*/
static delayFor(ms) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
}
/**
* Creates a sweep filter that sweeps archived threads
* @param {number} [lifetime=14400] How long a thread has to be archived to be valid for sweeping