Class TextChannelCreateSpec

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

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

      • TextChannelCreateSpec

        public TextChannelCreateSpec()
    • Method Detail

      • setPosition

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

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

        public TextChannelCreateSpec 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>