Class ClientPresence

    • Method Detail

      • online

        public static ClientPresence online()
        Creates an online presence.
        Returns:
        An online presence.
      • online

        public static ClientPresence online​(ClientActivity activity)
        Creates an online presence.
        Parameters:
        activity - The activity to be shown.
        Returns:
        An online presence with the given activity.
      • doNotDisturb

        public static ClientPresence doNotDisturb​(ClientActivity activity)
        Creates a do not disturb presence.
        Parameters:
        activity - The activity to be shown.
        Returns:
        A do not disturb with the given activity.
      • idle

        public static ClientPresence idle()
        Creates an idle presence.
        Returns:
        An idle presence.
      • idle

        public static ClientPresence idle​(ClientActivity activity)
        Creates an idle presence.
        Parameters:
        activity - The activity to be shown.
        Returns:
        An idle presence with the given activity.
      • of

        public static ClientPresence of​(Status status,
                                        @Nullable
                                        ClientActivity activity)
        Creates a presence with the given status and activity.
        Parameters:
        status - The status to be shown.
        activity - The activity to be shown.
        Returns:
        A presence with the given status and activity.
      • getStatusUpdate

        public discord4j.discordjson.json.gateway.StatusUpdate getStatusUpdate()
        Converts this presence's data to an object for use by the gateway.
        Returns:
        An equivalent StatusUpdate for this presence.