Interface IPostContainerManager<T extends IPostContainer, M extends IPostContainerManager<T,M>>

Type Parameters:
T - The channel type
M - The manager type
All Superinterfaces:
AuditableRestAction<Void>, ChannelManager<T,M>, IPermissionContainerManager<T,M>, IThreadContainerManager<T,M>, Manager<M>, RestAction<Void>
All Known Subinterfaces:
ForumChannelManager, MediaChannelManager

public interface IPostContainerManager<T extends IPostContainer, M extends IPostContainerManager<T,M>> extends IThreadContainerManager<T,M>, IPermissionContainerManager<T,M>
Manager abstraction to configure settings related to forum post containers, such as ForumChannel.
  • Method Details

    • setTagRequired

      @Nonnull @CheckReturnValue M setTagRequired(boolean requireTag)
      Sets the tag requirement state of this IPostContainer.
      If true, all new posts must have at least one tag.
      Parameters:
      requireTag - The new tag requirement state for the selected IPostContainer
      Returns:
      ChannelManager for chaining convenience.
      See Also:
    • setAvailableTags

      @Nonnull @CheckReturnValue M setAvailableTags(@Nonnull List<? extends BaseForumTag> tags)
      Sets the available tags of the selected IPostContainer.
      Tags will be ordered based on the provided list order.

      This is a full replacement of the tags list, all missing tags will be removed. You can use ForumTagData to create new tags or update existing ones.

      Example

      List<BaseForumTag> tags = new ArrayList<>(channel.getAvailableTags());
      tags.add(new ForumTagData("question").setModerated(true)); // add a new tag
      tags.set(0, ForumTagData.from(tags.get(0)).setName("bug report")); // update an existing tag
      // Update the tag list
      channel.getManager().setAvailableTags(tags).queue();
      
      Parameters:
      tags - The new available tags in the desired order.
      Returns:
      ChannelManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided list is null or contains null elements
      See Also:
    • setDefaultReaction

      @Nonnull @CheckReturnValue M setDefaultReaction(@Nullable Emoji emoji)
      Sets the default reaction emoji of the selected IPostContainer.
      This does not support custom emoji from other guilds.
      Parameters:
      emoji - The new default reaction emoji, or null to unset.
      Returns:
      ChannelManager for chaining convenience
      See Also:
    • setDefaultSortOrder

      @Nonnull @CheckReturnValue M setDefaultSortOrder(@Nonnull IPostContainer.SortOrder sortOrder)
      Sets the default sort order of the selected IPostContainer.
      Parameters:
      sortOrder - The new IPostContainer.SortOrder
      Returns:
      ChannelManager for chaining convenience
      Throws:
      IllegalArgumentException - If null or IPostContainer.SortOrder.UNKNOWN is provided
      See Also:
    • setTopic

      @Nonnull @CheckReturnValue M setTopic(@Nullable String topic)
      Sets the topic of the selected channel.
      Parameters:
      topic - The new topic for the selected channel, null or empty String to reset
      Returns:
      ChannelManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided topic is greater than 4096 in length.