mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 22:10:24 +00:00
9 lines
305 B
TypeScript
9 lines
305 B
TypeScript
import DataLoader from 'dataloader'
|
|
import * as Query from './Query'
|
|
|
|
const loaders = {
|
|
bor: new DataLoader(async (ids:string[]) => await Promise.all(ids.map((el:string)=> Query.getBot(el)))),
|
|
user: new DataLoader(async (ids:string[]) => await Promise.all(ids.map((el:string)=> Query.getUser(el)))),
|
|
}
|
|
|