corde
Version:
A simple library for Discord bot tests
25 lines (19 loc) • 467 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true,
});
exports.wait = void 0;
function wait(timeMilliseconds) {
return new Promise((resolve, reject) => {
if (!timeMilliseconds) {
return reject(new Error("Invalid value"));
}
if (timeMilliseconds < 0) {
return reject(new Error("Time can not be lower than 0"));
}
setTimeout(() => {
resolve();
}, timeMilliseconds);
});
}
exports.wait = wait;