Class NewsChannelCreateSpec

  • All Implemented Interfaces:
    AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>, Spec<discord4j.discordjson.json.ChannelCreateRequest>

    public class NewsChannelCreateSpec
    extends Object
    implements AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
    Spec used to create guild NewsChannel entities.
    See Also:
    Create Guild Channel
    • Constructor Detail

      • NewsChannelCreateSpec

        public NewsChannelCreateSpec()
    • Method Detail

      • setPosition

        public NewsChannelCreateSpec setPosition​(int position)
        Sets the sorting position of the created NewsChannel.
        Parameters:
        position - The channel position.
        Returns:
        This spec.
      • setNsfw

        public NewsChannelCreateSpec setNsfw​(boolean nsfw)
        Sets whether the created NewsChannel is NSFW (not safe for work).
        Parameters:
        nsfw - The channel nsfw property.
        Returns:
        This spec.
      • setReason

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

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

        public discord4j.discordjson.json.ChannelCreateRequest asRequest()
        Specified by:
        asRequest in interface Spec<discord4j.discordjson.json.ChannelCreateRequest>