Class AllowedMentions.Builder

java.lang.Object
discord4j.rest.util.AllowedMentions.Builder
Enclosing class:
AllowedMentions

public static class AllowedMentions.Builder extends Object
A builder for creating AllowedMentions objects.
See Also:
  • Method Details

    • parseType

      Add a type to the allowed parsed types list.
      Parameters:
      type - the type to parse
      Returns:
      this builder
    • allowUser

      public AllowedMentions.Builder allowUser(Snowflake userId)
      Add a user to the allowed users list.
      Parameters:
      userId - the user to allow
      Returns:
      this builder
    • allowRole

      public AllowedMentions.Builder allowRole(Snowflake roleId)
      Add a role to the allowed roles list.
      Parameters:
      roleId - the role to allow
      Returns:
      this builder
    • parseType

      public AllowedMentions.Builder parseType(AllowedMentions.Type... type)
      Add types to the allowed parsed types list.
      Parameters:
      type - the types to parse
      Returns:
      this builder
    • allowUser

      public AllowedMentions.Builder allowUser(Snowflake... userId)
      Add users to the allowed users list.
      Parameters:
      userId - the users to allow
      Returns:
      this builder
    • allowRole

      public AllowedMentions.Builder allowRole(Snowflake... roleId)
      Add roles to the allowed roles list.
      Parameters:
      roleId - the roles to allow
      Returns:
      this builder
    • repliedUser

      public AllowedMentions.Builder repliedUser(boolean repliedUser)
      Set whether to mention the author of the message being replied to.
      Parameters:
      repliedUser - whether to mention the author of the message being replied to.
      Returns:
      this builder
    • build

      public AllowedMentions build()
      Build the AllowedMentions object
      Returns:
      the allowed mentions object