new MessageNotification()
This is a notification of a existing message describing it.
Properties:
Name | Type | Description |
---|---|---|
client |
Client | Client object used to create this MessageNotification instance. |
conversation |
Conversation | Conversation where the message have been sent. |
ID |
string | Curse UUID of the message, this ID is shared between all references of this message. |
content |
string | Text content of the message. |
notificationType |
number | Specify the type of the notification following the conversations-v1 ConversationNotificationType endpoint definition.
|
senderName |
string | Nickname (if set) or Curse username of the message author. |
senderID |
number | DEPRECATED Curse ID of the author of the message (Please use MessageNotification.sender.ID). |
sender |
User | User object corresponding to the author of the message. |
serverTimestamp |
number | Timestamp of the message on the server side. |
likes |
number | Amount of likes. |
likeUserIDs |
array | Array of number corresponding to the IDs of all the user liking this message. |
isDeleted |
boolean | True if the message have been deleted (content will be empty then). |
senderVanityRole |
Role | Most important Role of the author on this server (undefined if not a conversation from a server). |
senderRoles |
array | Array of Role of the author on this server (undefined if not a conversation from a server). |
editedTimestamp |
number | Timestamp of the last edition of the message, if none, it is set at 0. |
editedUser |
User | User object corresponding to the author of the last edition of this message. |
editedUsername |
string | Nickname or Curse username of the author of the last edition of this message. |
deletedTimestamp |
number | Timestamp of the suppression of the message, if none, it is set at 0. |
deletedUser |
User | User object corresponding to the author of the suppression this message. |
deletedUsername |
string | Nickname or Curse username of the author of the suppression of this message. |
mentions |
array | Array of {Users}[@link User] mentioned in this message. |
atEveryoneMention |
boolean | True if there is a global mention in the message. |
- Source:
Methods
deleteMessage(callback)
Delete the message from the conversation
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Facultative arg, callback: (errors) => {}. This function can take an argument errors that is null or undefined when function ends correctly. |
- Source:
editContent(newContent, callback)
Edit the content of the message
Parameters:
Name | Type | Description |
---|---|---|
newContent |
string | Text of the new message |
callback |
function | Facultative arg, callback: (errors) => {}. This function can take an argument errors that is null or undefined when function ends correctly. |
- Source: