MCPcopy
hub / github.com/LLOneBot/LuckyLilliaBot / decodeUser

Function decodeUser

src/satori/utils.ts:36–43  ·  view source on GitHub ↗
(user: User)

Source from the content-addressed store, hash-verified

34]
35
36export function decodeUser(user: User): ObjectToSnake<Universal.User> {
37 return {
38 id: user.uin.toString(),
39 name: user.nick,
40 avatar: `http://q.qlogo.cn/headimg_dl?dst_uin=${user.uin}&spec=640`,
41 is_bot: robotUinRanges.some(e => +user.uin >= +e.minUin && +user.uin <= +e.maxUin)
42 }
43}
44
45function decodeGuildChannelId(data: NT.RawMessage) {
46 if (data.chatType === NT.ChatType.Group) {

Callers 13

utils.test.tsFile · 0.90
eventMethod · 0.90
getUserFunction · 0.90
getReactionListFunction · 0.90
getLoginFunction · 0.90
getFriendListFunction · 0.90
parseReactionAddedFunction · 0.90
parseReactionRemovedFunction · 0.90
parseGuildMemberAddedFunction · 0.90
parseGuildMemberRemovedFunction · 0.90
parseFriendRequestFunction · 0.90
parseMessageDeletedFunction · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected