MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / updateCachedDiscordUser

Function updateCachedDiscordUser

packages/core/src/auth.ts:695–706  ·  view source on GitHub ↗
(
		accessToken: string,
		user: DiscordAPIUserSchema,
	)

Source from the content-addressed store, hash-verified

693 }
694
695 export async function updateCachedDiscordUser(
696 accessToken: string,
697 user: DiscordAPIUserSchema,
698 ) {
699 const client = await Cache.getRedisClient();
700 await client.setEx(
701 getDiscordUserRedisKey(accessToken),
702 hoursToSeconds(DISCORD_USER_CACHE_TTL_IN_HOURS),
703 JSON.stringify(user),
704 );
705 return user;
706 }
707
708 export async function getDiscordUser(opts: DiscordApiCallOpts) {
709 const client = await Cache.getRedisClient();

Callers 1

getDiscordUserFunction · 0.85

Calls 2

getDiscordUserRedisKeyFunction · 0.85
hoursToSecondsFunction · 0.85

Tested by

no test coverage detected