Package arc.discord

Class DiscordRPC


public final class DiscordRPC extends Object
Simple class for handling Discord Rich Presence. Implementation based on This the only know implementation that is pure Java; on Linux/Mac, this uses Java 16's new Unix sockets.
  • Field Details

  • Constructor Details

    • DiscordRPC

      public DiscordRPC()
  • Method Details

    • connect

      public static void connect(long clientId) throws Exception
      Call before sending any presence updates.
    • send

      public static void send(DiscordRPC.RichPresence presence)
      Updates the displayed rich presence.
    • subscribe

      public static void subscribe()
      Subscribes to all activity events.
    • getStatus

      public static DiscordRPC.PipeStatus getStatus()
    • close

      public static void close()
      Attempts to close an open connection to Discord. Does nothing if not connected.