Class InteractionMemberImpl
java.lang.Object
net.essentialsx.discord.interactions.InteractionMemberImpl
- All Implemented Interfaces:
InteractionMember
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the discord mention of this member.Gets the four numbers after the#
in the member's username.Gets the nickname of this member or their username if they don't have one.getId()
Gets the ID of this member.net.dv8tion.jda.api.entities.Member
getName()
Gets the username of this member.Gets the nickname of this member or null if they do not have one.boolean
Returns true if the user has a role by the specified ID.boolean
hasRole
(InteractionRole role) Returns true if the user has the specifiedrole
.boolean
Returns true if the user has one of the specified roles.boolean
isAdmin()
Checks if this member has the administrator permission on Discord.sendPrivateMessage
(String content) Sends a private message to this member with the given content.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.essentialsx.api.v2.services.discord.InteractionMember
getTag
-
Constructor Details
-
InteractionMemberImpl
public InteractionMemberImpl(net.dv8tion.jda.api.entities.Member member)
-
-
Method Details
-
getName
Description copied from interface:InteractionMember
Gets the username of this member.- Specified by:
getName
in interfaceInteractionMember
- Returns:
- this member's username.
-
getDiscriminator
Description copied from interface:InteractionMember
Gets the four numbers after the#
in the member's username.- Specified by:
getDiscriminator
in interfaceInteractionMember
- Returns:
- this member's discriminator.
-
getAsMention
Description copied from interface:InteractionMember
Gets the discord mention of this member.- Specified by:
getAsMention
in interfaceInteractionMember
- Returns:
- this member's mention.
-
getEffectiveName
Description copied from interface:InteractionMember
Gets the nickname of this member or their username if they don't have one.- Specified by:
getEffectiveName
in interfaceInteractionMember
- Returns:
- this member's nickname or username if none is present.
-
getNickname
Description copied from interface:InteractionMember
Gets the nickname of this member or null if they do not have one.- Specified by:
getNickname
in interfaceInteractionMember
- Returns:
- this member's nickname or null.
-
getId
Description copied from interface:InteractionMember
Gets the ID of this member.- Specified by:
getId
in interfaceInteractionMember
- Returns:
- this member's ID.
-
isAdmin
public boolean isAdmin()Description copied from interface:InteractionMember
Checks if this member has the administrator permission on Discord.- Specified by:
isAdmin
in interfaceInteractionMember
- Returns:
- true if this user has administrative permissions.
-
hasRoles
Description copied from interface:InteractionMember
Returns true if the user has one of the specified roles.- Specified by:
hasRoles
in interfaceInteractionMember
- Parameters:
roleDefinitions
- A list of role definitions from the config.- Returns:
- true if the member has one of the given roles.
-
hasRole
Description copied from interface:InteractionMember
Returns true if the user has the specifiedrole
.- Specified by:
hasRole
in interfaceInteractionMember
- Parameters:
role
- The role to check for.- Returns:
- true if the member has the specified role.
-
hasRole
Description copied from interface:InteractionMember
Returns true if the user has a role by the specified ID.- Specified by:
hasRole
in interfaceInteractionMember
- Parameters:
roleId
- The role id to check for.- Returns:
- true if the member has a role by the specified ID.
-
getJdaObject
public net.dv8tion.jda.api.entities.Member getJdaObject() -
sendPrivateMessage
Description copied from interface:InteractionMember
Sends a private message to this member with the given content.- Specified by:
sendPrivateMessage
in interfaceInteractionMember
- Parameters:
content
- The message to send.- Returns:
- A future which will complete a boolean stating the success of the message.
-