Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 835 Bytes

README.md

File metadata and controls

36 lines (30 loc) · 835 Bytes

DRPC

GoDoc

Discord RPC implementation in Go.

$ go get -u github.com/altfoxie/drpc

Usage

You need to create a client.

client, err := drpc.New("APP_ID")
if err != nil { /* handle error */ }

Now you can use the client to set player's activity. DRPC maintains a persistent connection to Discord RPC, so you don't need to worry about reconnecting.

err := client.SetActivity(drpc.Activity{
    State: "Playing",
    Details: "Unranked PvP",
    Timestamps: &drpc.Timestamps{
        Start: time.Now(),
    },
    // Other fields...
})
if err != nil { /* handle error */ }

Roadmap

  • Support Windows
  • Support events
  • Match responses with method calls by nonce

License

MIT