Class NewsChannelEditSpec

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

    public class NewsChannelEditSpec
    extends Object
    implements AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
    Spec used to modify a guild NewsChannel settings. G
    See Also:
    Modify Channel
    • Constructor Detail

      • NewsChannelEditSpec

        public NewsChannelEditSpec()
    • Method Detail

      • setPosition

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

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

        public NewsChannelEditSpec 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.ChannelModifyRequest>
        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.ChannelModifyRequest>
        Returns:
        The current audit log reason.
      • asRequest

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