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

Function insertQueue

src/utils/queue.utils.ts:13–22  ·  view source on GitHub ↗
(store: Store, queue: NewQueue)

Source from the content-addressed store, hash-verified

11
12export namespace QueueUtils {
13 export async function insertQueue(store: Store, queue: NewQueue) {
14 const insertedQueue = store.insertQueue(queue);
15
16 const role = get(queue, "role") as Role;
17 if (role) {
18 await MemberUtils.assignInQueueRoleToMembers(store, [insertedQueue], role.id, "add");
19 }
20
21 return { insertedQueue };
22 }
23
24 export async function updateQueues(store: Store, queues: ArrayOrCollection<bigint, DbQueue>, update: Partial<DbQueue>) {
25 return await db.transaction(async () => {

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
insertQueueMethod · 0.80

Tested by

no test coverage detected