TikTok.Chat
A chat message.
- Platform: tiktok
- Shape:
chat - Source event:
TikTok.Chat
Widget.on("TikTok.Chat", (event) => { // event.user, event.platform…});Fields
Section titled “Fields”user(string): Display name; «Anonymous» for anonymous gifts.userId(string): User id on its platform.userLogin(string): Login, lowercase.color(string): Name color (#RRGGBB) or empty.role(1 | 2 | 3 | 4): 1 viewer, 2 VIP, 3 moderator, 4 broadcaster.badges(ChatBadge[]): Badges, with their image.message(string): The message, as plain text.parts(MessagePart[]): The message in parts (text, emotes and cheers), for Widget.dom.renderMessage.messageId(string): Message id; the one messageDeleted carries.firstMessage(boolean): First message in the channel.highlighted(boolean): Highlighted with channel points.reply(ChatReply | null): Who it replies to, or null.
It also carries platform (the source platform) and raw (the original payload).
Example
Section titled “Example”The example payload that reaches the Studio simulator:
{ "comment": "¡Hola desde TikTok!", "emotes": [], "contentLanguage": "es", "userIdentity": { "isGiftGiverOfAnchor": false, "isSubscriberOfAnchor": false, "isMutualFollowingWithAnchor": true, "isFollowerOfAnchor": true, "isModeratorOfAnchor": false, "isAnchor": false }, "userId": "7012345678901234567", "uniqueId": "neonfox", "nickname": "NeonFox", "profilePictureUrl": "", "followRole": 2, "userBadges": [], "userDetails": { "createTime": "0", "bioDescription": "", "profilePictureUrls": [] }, "followInfo": { "followingCount": 120, "followerCount": 45, "followStatus": 2, "pushStatus": 0 }, "isModerator": false, "isNewGifter": false, "isSubscriber": false, "topGifterRank": 0, "msgId": "7298765432109876543", "createTime": "1792031504980"}