MCPcopy Create free account
hub / github.com/AnswerOverflow/AnswerOverflow / removeServerFromUserCache

Function removeServerFromUserCache

packages/core/src/auth.ts:640–650  ·  view source on GitHub ↗
(
		opts: DiscordApiCallOpts & { serverId: string },
	)

Source from the content-addressed store, hash-verified

638 }
639
640 export async function removeServerFromUserCache(
641 opts: DiscordApiCallOpts & { serverId: string },
642 ) {
643 const cachedServers = await getUserServers(opts);
644 if (cachedServers) {
645 const filteredServers = cachedServers.filter(
646 (server) => server.id !== opts.serverId,
647 );
648 await updateUserServersCache(opts.accessToken, filteredServers);
649 }
650 }
651
652 export async function addServerToUserServerCache(
653 opts: DiscordApiCallOpts & { server: DiscordAPIServerSchema },

Callers

nothing calls this directly

Calls 2

getUserServersFunction · 0.85
updateUserServersCacheFunction · 0.85

Tested by

no test coverage detected