Package com.github.alex1304.jdash.entity
Class GDMessage
- java.lang.Object
-
- com.github.alex1304.jdash.entity.GDMessage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
reactor.core.publisher.Mono<String>
getBody()
Gets the message body.long
getId()
The unique identifier for the entity.long
getSenderID()
String
getSenderName()
String
getSubject()
String
getTimestamp()
int
hashCode()
boolean
isRead()
String
toString()
-
-
-
Constructor Detail
-
GDMessage
public GDMessage(long id, long senderID, String senderName, String subject, java.util.function.Supplier<reactor.core.publisher.Mono<String>> body, boolean isRead, String timestamp)
-
-
Method Detail
-
getSenderID
public long getSenderID()
-
getSenderName
public String getSenderName()
-
getSubject
public String getSubject()
-
getBody
public reactor.core.publisher.Mono<String> getBody()
Gets the message body. This has also the side-effect of marking the message as read server-side. Though it won't change the value returned byisRead()
.- Returns:
- a Mono emitting the message body
-
isRead
public boolean isRead()
-
getTimestamp
public String getTimestamp()
-
equals
public boolean equals(Object obj)
-
getId
public final long getId()
Description copied from interface:GDEntity
The unique identifier for the entity.
-
-