MCPcopy Create free account
hub / github.com/ArrowM/Queue-Bot / updateQueues

Function updateQueues

src/utils/queue.utils.ts:24–37  ·  view source on GitHub ↗
(store: Store, queues: ArrayOrCollection<bigint, DbQueue>, update: Partial<DbQueue>)

Source from the content-addressed store, hash-verified

22 }
23
24 export async function updateQueues(store: Store, queues: ArrayOrCollection<bigint, DbQueue>, update: Partial<DbQueue>) {
25 return await db.transaction(async () => {
26 const updatedQueues = map(queues, queue => store.updateQueue({ id: queue.id, ...update }));
27 const updatedQueueIds = updatedQueues.map(queue => queue.id);
28
29 DisplayUtils.requestDisplaysUpdate(store, updatedQueueIds);
30
31 if (update.roleInQueueId) {
32 await MemberUtils.assignInQueueRoleToMembers(store, updatedQueues, update.roleInQueueId, "add");
33 }
34
35 return { updatedQueues };
36 });
37 }
38}

Callers

nothing calls this directly

Calls 2

mapFunction · 0.90
updateQueueMethod · 0.80

Tested by

no test coverage detected