import { type RESTGetAPIUserResult, Routes } from "discord-api-types/rest/v10"; import rest from "../rest"; import config from "@/config"; const cache = new Map(); export async function getUser(id: string) { const cached = cache.get(id); if (cached) return cached; const res = (await rest.get( Routes.guildMember(config.discord.guild, id), )) as RESTGetAPIUserResult; cache.set(id, res); return res; }