Class AllowedMentionsBuilder



  • public class AllowedMentionsBuilder
    extends Object
    This class is used to create mentions.
    • Constructor Detail

      • AllowedMentionsBuilder

        public AllowedMentionsBuilder​()
    • Method Detail

      • getDelegate

        public AllowedMentionsBuilderDelegate getDelegate​()
        Gets the delegate used by this mentions builder internally.
        Returns:
        The delegate used by this mention builder internally.
      • setMentionRoles

        public AllowedMentionsBuilder setMentionRoles​(boolean value)
        Mentions all mentioned roles.
        Parameters:
        value - If roles should be mentioned or not.
        Returns:
        The current instance in order to chain call methods.
      • setMentionUsers

        public AllowedMentionsBuilder setMentionUsers​(boolean value)
        Mentions all mentioned users.
        Parameters:
        value - If users should be mentioned or not.
        Returns:
        The current instance in order to chain call methods.
      • setMentionEveryoneAndHere

        public AllowedMentionsBuilder setMentionEveryoneAndHere​(boolean value)
        Mentions @everyone and @here.
        Parameters:
        value - If @everyone and @here should be mentioned.
        Returns:
        The current instance in order to chain call methods.
      • addRole

        public AllowedMentionsBuilder addRole​(String roleId)
        Adds a role to the list which will be mentioned.
        Parameters:
        roleId - The id of the role.
        Returns:
        The current instance in order to chain call methods.
      • addRole

        public AllowedMentionsBuilder addRole​(long roleId)
        Adds a role to the list which will be mentioned.
        Parameters:
        roleId - The id of the role.
        Returns:
        The current instance in order to chain call methods.
      • addRoles

        public AllowedMentionsBuilder addRoles​(Collection<Long> roleIds)
        Adds the roles to the list which will be mentioned.
        Parameters:
        roleIds - A collection of role id's which will be mentioned.
        Returns:
        The current instance in order to chain call methods.
      • addUser

        public AllowedMentionsBuilder addUser​(String userId)
        Adds a user to the list which will be mentioned.
        Parameters:
        userId - The id of the user.
        Returns:
        The current instance in order to chain call methods.
      • addUser

        public AllowedMentionsBuilder addUser​(long userId)
        Adds a user to the list which will be mentioned.
        Parameters:
        userId - The id of the user.
        Returns:
        The current instance in order to chain call methods.
      • addUsers

        public AllowedMentionsBuilder addUsers​(Collection<Long> userIds)
        Adds the users to the list which will be mentioned.
        Parameters:
        userIds - A collection of user id's which will be mentioned.
        Returns:
        The current instance in order to chain call methods.
      • removeRole

        public AllowedMentionsBuilder removeRole​(String roleId)
        Removes a role from the list which will be mentioned.
        Parameters:
        roleId - The id of the role.
        Returns:
        The current instance in order to chain call methods.
      • removeRole

        public AllowedMentionsBuilder removeRole​(long roleId)
        Removes a role from the list which will be mentioned.
        Parameters:
        roleId - The id of the role.
        Returns:
        The current instance in order to chain call methods.
      • removeRoles

        public AllowedMentionsBuilder removeRoles​(Collection<Long> roleIds)
        Removes the roles from the list which will be mentioned.
        Parameters:
        roleIds - A collection of role id's which will be removed from the list.
        Returns:
        The current instance in order to chain call methods.
      • removeUser

        public AllowedMentionsBuilder removeUser​(String userId)
        Removes an user from the list which will be mentioned.
        Parameters:
        userId - The id of the user.
        Returns:
        The current instance in order to chain call methods.
      • removeUser

        public AllowedMentionsBuilder removeUser​(long userId)
        Removes an user from the list which will be mentioned.
        Parameters:
        userId - The id of the user.
        Returns:
        The current instance in order to chain call methods.
      • removeUsers

        public AllowedMentionsBuilder removeUsers​(Collection<Long> userIds)
        Removes the users from the list which will be mentioned.
        Parameters:
        userIds - A collection of user id's which will be removed from the list.
        Returns:
        The current instance in order to chain call methods.