(user: User)
| 34 | ] |
| 35 | |
| 36 | export 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 | |
| 45 | function decodeGuildChannelId(data: NT.RawMessage) { |
| 46 | if (data.chatType === NT.ChatType.Group) { |
no test coverage detected