Class ThreadCreateMetadata

java.lang.Object
net.dv8tion.jda.api.requests.restaction.ThreadCreateMetadata

public class ThreadCreateMetadata extends Object
Metadata used to create a thread through a webhook message.
See Also:
  • Constructor Details

    • ThreadCreateMetadata

      public ThreadCreateMetadata(@Nonnull String name)
      Create a new thread metadata instance.
      Parameters:
      name - The title of the thread (1-100 characters)
      Throws:
      IllegalArgumentException - If the provided name is null or not between 1 and 100 characters long
  • Method Details

    • addTags

      @Nonnull public ThreadCreateMetadata addTags(@Nonnull Collection<? extends ForumTagSnowflake> tags)
      Apply the provided tags to the forum post.
      Parameters:
      tags - The tags to apply
      Returns:
      The updated metadata instance
      Throws:
      IllegalArgumentException - If null or more than 5 tags are provided
    • addTags

      @Nonnull public ThreadCreateMetadata addTags(@Nonnull ForumTagSnowflake... tags)
      Apply the provided tags to the forum post.
      Parameters:
      tags - The tags to apply
      Returns:
      The updated metadata instance
      Throws:
      IllegalArgumentException - If null or more than 5 tags are provided
    • getName

      @Nonnull public String getName()
      The thread name.
      Returns:
      The thread name
    • getAppliedTags

      @Nonnull public List<ForumTagSnowflake> getAppliedTags()
      The applied tags for the thread / forum post.
      Returns:
      The applied tags