MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / parseAuthor

Function parseAuthor

apps/web/services/discord/users.ts:137–152  ·  view source on GitHub ↗
(author: DiscordAuthor, accountId: string)

Source from the content-addressed store, hash-verified

135}
136
137const parseAuthor = (author: DiscordAuthor, accountId: string) => {
138 return {
139 externalUserId: author.id,
140 accountsId: accountId,
141 displayName: author.username,
142 anonymousAlias: generateRandomWordSlug(),
143 isAdmin: false,
144 isBot: author.bot || false,
145 ...(author.avatar && {
146 profileImageUrl: buildUserAvatar({
147 userId: author.id,
148 avatarId: author.avatar,
149 }),
150 }),
151 };
152};

Callers 1

findUsersFunction · 0.85

Calls 2

generateRandomWordSlugFunction · 0.90
buildUserAvatarFunction · 0.85

Tested by

no test coverage detected