File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 22import * as Yup from 'yup'
33import { Client } from 'discord.js'
44import NotificationManager from '@utils/NotificationManager'
5+ import { CacheManager } from '@utils/Query'
56
67declare global {
78 interface Window {
@@ -14,6 +15,7 @@ declare global {
1415 var kodl : Client
1516 var serverlist : Client
1617 var notification : NotificationManager
18+ var get : CacheManager
1719 interface Navigator {
1820 standalone ?: boolean
1921 }
Original file line number Diff line number Diff line change @@ -1199,7 +1199,7 @@ async function viewBot(id: string) {
11991199 await Bots . findByIdAndUpdate ( id , { $push : { viewMetrix : { count : 0 } } } , { upsert : true } )
12001200}
12011201
1202- export const get = {
1202+ const _get = {
12031203 discord : {
12041204 user : new DataLoader (
12051205 async ( ids : string [ ] ) =>
@@ -1414,6 +1414,14 @@ export const get = {
14141414 } ,
14151415}
14161416
1417+ export type CacheManager = typeof _get
1418+
1419+ if ( ! global . get ) {
1420+ global . get = _get
1421+ }
1422+
1423+ export const get = global . get
1424+
14171425export const update = {
14181426 assignToken,
14191427 resetBotToken,
You can’t perform that action at this time.
0 commit comments