Class DiscordRPC

java.lang.Object
dev.pfaff.discordrpc.DiscordRPC
All Implemented Interfaces:
AutoCloseable

public final class DiscordRPC extends Object implements AutoCloseable
  • Field Details

    • IS_WINDOWS

      public static final boolean IS_WINDOWS
  • Constructor Details

  • Method Details

    • isConnected

      public boolean isConnected()
    • setActivity

      public void setActivity(int pid, @Nullable Activity activity) throws IOException
      Throws:
      IOException
    • sendActivityJoinInvite

      public void sendActivityJoinInvite(String user_id) throws IOException
      Accepts an Ask to Join request.
      Parameters:
      user_id - the user whose request to accept
      Throws:
      IOException
    • closeActivityRequest

      public void closeActivityRequest(String user_id) throws IOException
      Rejects an Ask to Join request.
      Parameters:
      user_id - the user whose request to reject
      Throws:
      IOException
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception