mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: expose isBuffering
This commit is contained in:
@@ -48,6 +48,8 @@ type BaileysBufferableEventEmitter = BaileysEventEmitter & {
|
||||
flush(): Promise<void>
|
||||
/** waits for the task to complete, before releasing the buffer */
|
||||
processInBuffer(task: Promise<any>)
|
||||
/** is there an ongoing buffer */
|
||||
isBuffering(): boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,6 +141,9 @@ export const makeEventBuffer = (logger: Logger): BaileysBufferableEventEmitter =
|
||||
preBufferTask = Promise.allSettled([ preBufferTask, task ])
|
||||
}
|
||||
},
|
||||
isBuffering() {
|
||||
return isBuffering
|
||||
},
|
||||
buffer,
|
||||
flush,
|
||||
createBufferedFunction(work) {
|
||||
|
||||
Reference in New Issue
Block a user