mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
19 lines
357 B
TypeScript
19 lines
357 B
TypeScript
/** unnecessary */
|
|
|
|
import type { Shard } from '../services/shard';
|
|
|
|
export async function checkOffline(
|
|
shard: Shard,
|
|
highPriority: boolean
|
|
): Promise<void> {
|
|
if (!shard.isOpen()) {
|
|
await new Promise(resolve => {
|
|
if (highPriority) {
|
|
shard.offlineSendQueue.unshift(resolve);
|
|
} else {
|
|
shard.offlineSendQueue.push(resolve);
|
|
}
|
|
});
|
|
}
|
|
}
|