Amiko1048596 / Amino.js

A client for aminoapps based on node.js
MIT License
1 stars 0 forks source link

On_text_message socket typed response #1

Open Wesley-Fernandes opened 2 months ago

Wesley-Fernandes commented 2 months ago

/**

Wesley-Fernandes commented 2 months ago

With this, data have his types.

Amiko1048596 commented 2 months ago

How do I implement this?

Wesley-Fernandes commented 2 months ago

image

You just need to put it on top of the on_text_message function

Wesley-Fernandes commented 2 months ago

I made some updates, if you're going to add them, try adding the one I'm going to send now:

/**
 * Function called when a text message is received.
 * @param {Object} data - The message data.
 * @param {number} data.t - The timestamp of the message.
 * @param {Object} data.o - The object containing the message details.
 * @param {number} data.o.ndcId - The ID of the ndc.
 * @param {Object} data.o.chatMessage - The details of the chat message.
 * @param {Object} data.o.chatMessage.author - The author of the message.
 * @param {Object} data.o.chatMessage.author.user - Details of the message author user.
 * @param {string} data.o.chatMessage.author.user.uid - The user's UID.
 * @param {number} data.o.chatMessage.author.user.status - The user's status.
 * @param {string} data.o.chatMessage.author.user.icon - The user's icon.
 * @param {number} data.o.chatMessage.author.user.reputation - The user's reputation.
 * @param {number} data.o.chatMessage.author.user.role - The user's role.
 * @param {string} data.o.chatMessage.author.user.nickname - The user's nickname.
 * @param {number} data.o.chatMessage.author.user.level - The user's level.
 * @param {number} data.o.chatMessage.author.user.accountMembershipStatus - The user's account membership status.
 * @param {Object} data.o.chatMessage.author.user.avatarFrame - The user's avatar frame.
 * @param {number} data.o.chatMessage.author.user.avatarFrame.status - The status of the user's avatar frame.
 * @param {number} data.o.chatMessage.author.user.avatarFrame.version - The version of the user's avatar frame.
 * @param {string} data.o.chatMessage.author.user.avatarFrame.resourceUrl - The resource URL of the user's avatar frame.
 * @param {string} data.o.chatMessage.author.user.avatarFrame.name - The name of the user's avatar frame.
 * @param {string} data.o.chatMessage.author.user.avatarFrame.icon - The icon of the user's avatar frame.
 * @param {number} data.o.chatMessage.author.user.avatarFrame.frameType - The frame type of the user's avatar frame.
 * @param {string} data.o.chatMessage.author.user.avatarFrame.frameId - The frame ID of the user's avatar frame.
 * @param {string} data.o.chatMessage.threadId - The thread ID.
 * @param {number} data.o.chatMessage.mediaType - The media type of the message.
 * @param {string} data.o.chatMessage.content - The content of the message.
 * @param {number} data.o.chatMessage.clientRefId - The client reference ID.
 * @param {string} data.o.chatMessage.messageId - The message ID.
 * @param {string} data.o.chatMessage.uid - The message UID.
 * @param {string} data.o.chatMessage.createdTime - The creation time of the message.
 * @param {number} data.o.chatMessage.type - The type of the message.
 * @param {boolean} data.o.chatMessage.isHidden - Whether the message is hidden.
 * @param {boolean} data.o.chatMessage.includedInSummary - Whether the message is included in the summary.
 * @param {Object} data.o.chatMessage.extensions - Message extensions.
 * @param {number} data.o.alertOption - The alert option.
 * @param {number} data.o.membershipStatus - The member status.
 */