decord/source/modules/rpc/helpers/transformUser.tsx

23 lines
784 B
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 10830
// Function ID: 10831
2026-07-20 16:05:17 +00:00
// Name: transformUser
2026-08-11 06:20:06 +00:00
// Dependencies: [1899, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 10830 (transformUser)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import parseAvatarDecorationData from "parseAvatarDecorationData" /* 1899 */;
const result = set.fileFinishedImporting("modules/rpc/helpers/transformUser.tsx");
2026-07-20 16:05:17 +00:00
export default function transformUser(id) {
2026-07-29 08:29:29 +00:00
let num = id.premiumType;
2026-08-24 06:08:38 +00:00
const obj = { id: id.id, username: id.username, discriminator: id.discriminator, global_name: id.globalName, avatar: id.avatar, avatar_decoration_data: parseAvatarDecorationData.parseAvatarDecorationData(avatarDecoration), bot, flags, premium_type: null };
2026-07-20 16:05:17 +00:00
({ avatarDecoration, bot, flags } = id);
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[8] = num;
2026-07-20 16:05:17 +00:00
return obj;
};