Class AllowedMentionsImpl
- java.lang.Object
-
- org.javacord.core.entity.message.mention.AllowedMentionsImpl
-
- All Implemented Interfaces:
AllowedMentions
public class AllowedMentionsImpl extends java.lang.Object implements AllowedMentions
-
-
Constructor Summary
Constructors Constructor Description AllowedMentionsImpl(boolean mentionAllRoles, boolean mentionAllUsers, boolean mentionEveryoneAndHere, boolean mentionRepliedUser, java.util.HashSet<java.lang.Long> allowedRoleMentions, java.util.HashSet<java.lang.Long> allowedUserMentions)
Creates a new mention.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.Long>
getAllowedRoleMentions()
java.util.Set<java.lang.Long>
getAllowedUserMentions()
boolean
getMentionRepliedUser()
java.util.EnumSet<AllowedMentionType>
getMentionTypes()
com.fasterxml.jackson.databind.node.ObjectNode
toJsonNode()
Gets the embed as aObjectNode
.com.fasterxml.jackson.databind.node.ObjectNode
toJsonNode(com.fasterxml.jackson.databind.node.ObjectNode object)
Adds the json data to the given object node.
-
-
-
Constructor Detail
-
AllowedMentionsImpl
public AllowedMentionsImpl(boolean mentionAllRoles, boolean mentionAllUsers, boolean mentionEveryoneAndHere, boolean mentionRepliedUser, java.util.HashSet<java.lang.Long> allowedRoleMentions, java.util.HashSet<java.lang.Long> allowedUserMentions)
Creates a new mention.- Parameters:
mentionAllRoles
- Whether it mentions all roles.mentionAllUsers
- Whether it mentions all users.mentionEveryoneAndHere
- Whether it mentions @everyone and @here.mentionRepliedUser
- Whether it mentions the replied user.allowedRoleMentions
- Mentions added role ids.allowedUserMentions
- Mentions added user ids.
-
-
Method Detail
-
getAllowedRoleMentions
public java.util.Set<java.lang.Long> getAllowedRoleMentions()
- Specified by:
getAllowedRoleMentions
in interfaceAllowedMentions
-
getAllowedUserMentions
public java.util.Set<java.lang.Long> getAllowedUserMentions()
- Specified by:
getAllowedUserMentions
in interfaceAllowedMentions
-
getMentionTypes
public java.util.EnumSet<AllowedMentionType> getMentionTypes()
- Specified by:
getMentionTypes
in interfaceAllowedMentions
-
getMentionRepliedUser
public boolean getMentionRepliedUser()
- Specified by:
getMentionRepliedUser
in interfaceAllowedMentions
-
toJsonNode
public com.fasterxml.jackson.databind.node.ObjectNode toJsonNode()
Gets the embed as aObjectNode
. This is what is sent to Discord.- Returns:
- The embed as a ObjectNode.
-
toJsonNode
public com.fasterxml.jackson.databind.node.ObjectNode toJsonNode(com.fasterxml.jackson.databind.node.ObjectNode object)
Adds the json data to the given object node.- Parameters:
object
- The object, the data should be added to.- Returns:
- The provided object with the data of the embed.
-
-