Class LegacyCategoryEditSpec

java.lang.Object
discord4j.core.spec.legacy.LegacyCategoryEditSpec
All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>, LegacySpec<discord4j.discordjson.json.ChannelModifyRequest>

public class LegacyCategoryEditSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
A spec used to edit an existing Category.
  • Constructor Details

    • LegacyCategoryEditSpec

      public LegacyCategoryEditSpec()
  • Method Details

    • setName

      public LegacyCategoryEditSpec setName(String name)
      Sets the name for the Category.
      Parameters:
      name - The new name of the category.
      Returns:
      This spec.
    • setPosition

      public LegacyCategoryEditSpec setPosition(int position)
      Sets the position for the Category.
      Parameters:
      position - The raw position for the category.
      Returns:
      This spec.
    • setPermissionOverwrites

      public LegacyCategoryEditSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
      Sets the permission overwrites for the Category.
      Parameters:
      permissionOverwrites - The Set<PermissionOverwrite> which contains overwrites for the category.
      Returns:
      This spec.
    • setReason

      public LegacyCategoryEditSpec setReason(@Nullable String reason)
      Description copied from interface: LegacyAuditSpec
      Sets the reason to show in the audit logs when the spec is built.
      Specified by:
      setReason in interface LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
      Parameters:
      reason - The audit log reason.
      Returns:
      This spec.
    • getReason

      @Nullable public String getReason()
      Description copied from interface: LegacyAuditSpec
      Returns the current audit log reason set on the spec.
      Specified by:
      getReason in interface LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
      Returns:
      The current audit log reason.
    • asRequest

      public discord4j.discordjson.json.ChannelModifyRequest asRequest()
      Specified by:
      asRequest in interface LegacySpec<discord4j.discordjson.json.ChannelModifyRequest>